project-config/jenkins/jobs/wheel-mirror.yaml
Paul Belanger c149a8aed3 Update centos7 wheel mirror naming schema
Because of AFS constraints, we need to shorten our naming for centos7.

Change-Id: I7f6f389ae692c764f5e4211abe9932a9e6b6a8c7
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-03-23 12:58:50 -04:00

89 lines
2.2 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
# 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}'
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
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