project-config/jenkins/jobs/wheel-mirror.yaml
Paul Belanger 022a55aa11
Fix wheel-build macro issue
We incorrectly didn't pass our python variable into the wheel-build
builder.

Change-Id: I6ef90f5fd8bce27c152c898591087e42fd57dc18
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-06-14 12:50:41 -04:00

90 lines
2.3 KiB
YAML

- builder:
name: wheel-build
builders:
- shell: |
#!/bin/bash -xe
# Generate the AFS Slug from the host system.
source /usr/local/jenkins/slave_scripts/afs-slug.sh
AFS_DIR=/afs/.openstack.org/mirror/wheel/$AFS_SLUG/
WHEEL_DIR=/opt/wheel/workspace
# Delete any previous build directory
rm -rf $WHEEL_DIR
mkdir $WHEEL_DIR
# Build the wheels into staging directory
echo "Building wheels"
/usr/local/jenkins/slave_scripts/wheel-build.sh $WHEEL_DIR {python}
# Get an afs token and copy the wheels to AFS
echo "Obtaining token and copying wheels to AFS"
k5start -t -f /etc/wheel.keytab \
service/wheel \
-- timeout -k 2m 30m \
/usr/local/jenkins/slave_scripts/wheel-copy.sh $WHEEL_DIR $AFS_DIR
# Get an afs token and rebuild the mirror index.html
echo "Obtaining token and rebuilding mirror index."
k5start -t -f /etc/wheel.keytab \
service/wheel \
-- timeout -k 2m 30m \
/usr/local/jenkins/slave_scripts/wheel-index.sh $AFS_DIR
echo "Done."
- builder:
name: afs-release
builders:
- shell: |
#!/bin/bash -xe
echo "Releasing afs volume {volume}."
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- \
vos release -v {volume}
echo "Done."
- job-template:
name: 'wheel-build-{node_arch}-{python}'
node: 'wheel-mirror-{node_arch}'
wrappers:
- build-timeout:
timeout: 90
- timestamps
builders:
- revoke-sudo
- link-logs
- net-info
- zuul-clone:
project: openstack/requirements
- wheel-build:
python: "{python}"
publishers:
- console-log
- job-template:
# mirror_arch must be 9 characters or less.
name: 'wheel-release-{mirror_arch}'
node: release
wrappers:
- build-timeout:
timeout: 90
- timestamps
builders:
- revoke-sudo
- link-logs
- net-info
- afs-release:
# This variable must never exceed 22 characters.
volume: 'mirror.wheel.{mirror_arch}'
publishers:
- console-log