
We incorrectly used ZUUL_BRANCH to extract branch info. As pointed out on IRC, we should be using ZUUL_REFNAME. Change-Id: Ieefbb39ddf31355d6a74ac3b4d68887d997270b0 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
83 lines
2.0 KiB
YAML
83 lines
2.0 KiB
YAML
- builder:
|
|
name: reprepro-import
|
|
builders:
|
|
- shell: |
|
|
#!/bin/bash -xe
|
|
|
|
AFS_DIR=/afs/.openstack.org/mirror/deb-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
|
|
|
|
# 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 -t -f /etc/packaging.keytab \
|
|
service/packaging \
|
|
-- timeout -k 2m 30m \
|
|
reprepro --confdir /etc/reprepro/{reprepro}"
|
|
|
|
# Get an afs token and import the packages to reprepro
|
|
echo "Obtaining token and importing packages to reprepro"
|
|
$REPREPRO include {codename}-$BRANCH $PACKAGE_DIR/*.changes
|
|
|
|
echo "Checking state of mirror"
|
|
$REPREPRO checkpool fast
|
|
$REPREPRO check
|
|
|
|
echo "List all packages"
|
|
$REPREPRO list {codename}-$BRANCH
|
|
|
|
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-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
|