openstack-zuul-jobs/playbooks/legacy/groups-release-branch/run.yaml
Monty Taylor a3139c4bb5 Migrate jobs from zuulv2 to zuulv3
This is the result of having run the zuul migration tool.

Depends-On: I72687a56285a3d733a9adeaf3dc037a1ac95efd3
Change-Id: Ib511da75908e152e72fdf0d7b496f4fa98f9c223
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-26 15:02:59 -04:00

83 lines
3.2 KiB
YAML

- hosts: all
name: Autoconverted job legacy-groups-release-branch from old job groups-release-branch
tasks:
- shell:
cmd: |
set -e
set -x
CLONEMAP=`mktemp`
function cleanup {
# In cases where zuul-cloner is aborted during a git
# clone operation, git will remove the git work tree in
# its cleanup. The work tree in these jobs is the
# workspace directory, which means that subsequent
# jenkins post-build actions can not run because the
# workspace has been removed.
# To reduce the likelihood of this having an impact,
# recreate the workspace directory if needed
mkdir -p $WORKSPACE
rm -f $CLONEMAP
}
trap cleanup EXIT
cat > $CLONEMAP << EOF
clonemap:
- name: $ZUUL_PROJECT
dest: .
EOF
/usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \
git://git.openstack.org $ZUUL_PROJECT
executable: /bin/bash
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: /usr/local/jenkins/slave_scripts/install-distro-packages.sh
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -x
sudo rm -f /etc/sudoers.d/jenkins-sudo
# Prove that general sudo access is actually revoked
! sudo -n true
executable: /bin/bash
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
/usr/local/jenkins/slave_scripts/version-properties.sh
source version.properties
# fetch drush
mkdir drush
curl -L https://github.com/drush-ops/drush/archive/6.0.0.tar.gz | tar -xz -C drush --strip 1
# build distribution
export PATH=./drush:$PATH
scripts/dev-build.sh
# Clean/create a tarball directory
rm -rf tarballs
mkdir -p tarballs
# Create an archive tarball.
tar -czf groups-$PROJECT_VER.tar.gz publish/
cp groups-$PROJECT_VER.tar.gz tarballs/groups-latest.tar.gz
mv groups-$PROJECT_VER.tar.gz tarballs/
# generate md5 checksums
cd tarballs
md5sum groups-$PROJECT_VER.tar.gz > groups-$PROJECT_VER.md5
sed s/$PROJECT_VER/latest/g groups-$PROJECT_VER.md5 > groups-latest.md5
cd ..
# build manifest file
if [[ "$COMMITS_SINCE_TAG" == "" ]]; then
VERSION=7.x-$PROJECT_VER
else
VERSION=7.x-0.x-dev
fi
MD5HASH=$(cat tarballs/groups-$PROJECT_VER.md5 | cut -d ' ' -f1)
OUTFILE=drupal-updates/release-history/groups/7.x
MANIFESTURL=http://tarballs.openstack.org/groups/drupal-updates/release-history/groups/7.x
mkdir -p drupal-updates/release-history/groups
scripts/release-manifest.php --version=$VERSION --releasetar=groups-$PROJECT_VER.tar.gz --md5=$MD5HASH --outfile=$OUTFILE --manifest-url=$MANIFESTURL --verbose --debug
executable: /bin/bash
environment: '{{ zuul | zuul_legacy_vars }}'