034cd887b0
Last patch from Paul has wrong path. Change-Id: I5bfdb9211dc339f7ebb5ad154d3cf4dd86bb0a10
121 lines
3.0 KiB
YAML
121 lines
3.0 KiB
YAML
- builder:
|
|
name: reprepro-import
|
|
builders:
|
|
- shell: |
|
|
#!/bin/bash -xe
|
|
|
|
BASE=/afs/.openstack.org/mirror/debian-openstack
|
|
BRANCH=$(echo $ZUUL_REFNAME | cut -d/ -f2)
|
|
PACKAGE_DIR=$WORKSPACE/packages
|
|
PROJECT=$(echo $ZUUL_PROJECT | cut -d/ -f2)
|
|
URL=http://tarballs.openstack.org/packaging-deb/$PROJECT/uploads/$ZUUL_COMMIT
|
|
|
|
K5START="k5start -t -f /etc/packaging.keytab \
|
|
service/packaging \
|
|
-- timeout -k 2m 30m"
|
|
|
|
# Build up which distribution we are using. Here we will be
|
|
# converting:
|
|
# jessie-> jessie-newton
|
|
# jessie-backports -> jessie-newton-backports
|
|
IFS='-' read -r -a array <<< {codename}
|
|
DISTRIBUTION="${{array[0]}}"
|
|
DISTRIBUTION+=-$BRANCH
|
|
if ! [ -z "${{array[1]}}" ]; then
|
|
DISTRIBUTION+="-${{array[1]}}"
|
|
fi
|
|
|
|
# Delete any previous build directory
|
|
rm -rf $PACKAGE_DIR
|
|
mkdir -p $PACKAGE_DIR
|
|
|
|
# Download prebuild packaging from tarballs.o.o
|
|
echo "Downloading packages"
|
|
wget --recursive \
|
|
--no-parent \
|
|
--no-host-directories \
|
|
--cut-dirs=4 \
|
|
-R "index.html*" \
|
|
--directory-prefix=$PACKAGE_DIR \
|
|
$URL/
|
|
|
|
REPREPRO="$K5START reprepro --confdir /etc/reprepro/{reprepro}"
|
|
|
|
# Get an afs token and import the packages to reprepro
|
|
echo "Obtaining token and importing packages to reprepro"
|
|
FILES=$PACKAGE_DIR/*.changes
|
|
for f in $FILES; do
|
|
$REPREPRO include $DISTRIBUTION $f
|
|
done
|
|
|
|
echo "Checking state of mirror"
|
|
$REPREPRO checkpool fast
|
|
$REPREPRO check
|
|
|
|
echo "List all packages"
|
|
$REPREPRO list $DISTRIBUTION
|
|
|
|
date --iso-8601=ns | $K5START tee $BASE/timestamp.txt
|
|
echo "Done."
|
|
|
|
- builder:
|
|
name: reprepro-gpg-sign
|
|
builders:
|
|
- shell: |
|
|
#!/bin/bash -xe
|
|
echo "Signing packages"
|
|
/usr/local/jenkins/slave_scripts/reprepro-gpg-sign.sh {codename}
|
|
echo "Done."
|
|
|
|
- job-template:
|
|
name: reprepro-import-{reprepro}-{codename}
|
|
node: release
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 90
|
|
- timestamps
|
|
|
|
builders:
|
|
- revoke-sudo
|
|
- link-logs
|
|
- net-info
|
|
- reprepro-import:
|
|
codename: "{codename}"
|
|
reprepro: "{reprepro}"
|
|
|
|
publishers:
|
|
- console-log
|
|
|
|
- job-template:
|
|
name: reprepro-sign-{codename}
|
|
node: signing
|
|
|
|
builders:
|
|
- revoke-sudo
|
|
- link-logs
|
|
- reprepro-gpg-sign:
|
|
codename: "{codename}"
|
|
|
|
publishers:
|
|
- console-log
|
|
|
|
- job-template:
|
|
name: reprepro-release-{volume}
|
|
node: release
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 90
|
|
- timestamps
|
|
|
|
builders:
|
|
- revoke-sudo
|
|
- link-logs
|
|
- net-info
|
|
- afs-release:
|
|
volume: mirror.{volume}
|
|
|
|
publishers:
|
|
- console-log
|