update promotion scripts for stable branches
Updates to the scripts to signal to the ci.centos job that a promotion can occur for branch. This is done in the same fashion that has been working for master. Change-Id: I5c83b2986b32f6e483199b59b822b8cec96edf7f
This commit is contained in:
parent
f977b3f3bc
commit
40144b4bc3
|
@ -52,7 +52,22 @@ cron {"refresh-server":
|
||||||
minute => "*/30"
|
minute => "*/30"
|
||||||
}
|
}
|
||||||
|
|
||||||
cron {"promote":
|
cron {"promote-master":
|
||||||
command => "timeout 10m /opt/stack/tripleo-ci/scripts/mirror-server/promote.sh current-tripleo periodic-tripleo-ci-centos-7-ovb-ha periodic-tripleo-ci-centos-7-ovb-nonha &>/var/log/last_promotion.log",
|
command => "timeout 10m /opt/stack/tripleo-ci/scripts/mirror-server/promote.sh master current-tripleo tripleo-dlrn-promote periodic-tripleo-ci-centos-7-ovb-ha periodic-tripleo-ci-centos-7-ovb-nonha &>/var/log/last_master_promotion.log",
|
||||||
|
minute => "40"
|
||||||
|
}
|
||||||
|
|
||||||
|
cron {"promote-ocata":
|
||||||
|
command => "timeout 10m /opt/stack/tripleo-ci/scripts/mirror-server/promote.sh ocata current-tripleo-ocata tripleo-dlrn-promote-ocata periodic-tripleo-ci-centos-7-ovb-ha-ocata &>/var/log/last_ocata_promotion.log",
|
||||||
|
minute => "40"
|
||||||
|
}
|
||||||
|
|
||||||
|
cron {"promote-newton":
|
||||||
|
command => "timeout 10m /opt/stack/tripleo-ci/scripts/mirror-server/promote.sh newton current-tripleo-newton tripleo-dlrn-promote-newton periodic-tripleo-ci-centos-7-ovb-ha-newton &>/var/log/last_newton_promotion.log",
|
||||||
|
minute => "40"
|
||||||
|
}
|
||||||
|
|
||||||
|
cron {"promote-mitaka":
|
||||||
|
command => "timeout 10m /opt/stack/tripleo-ci/scripts/mirror-server/promote.sh mitaka current-tripleo-mitaka tripleo-dlrn-promote-mitaka periodic-tripleo-ci-centos-7-ovb-ha-mitaka &>/var/log/last_mitaka_promotion.log",
|
||||||
minute => "40"
|
minute => "40"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,30 @@
|
||||||
#!/bin/bash -ex
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
# Here be the promote script
|
# Here be the promote script
|
||||||
# 1. Find all metadata files newer then the one currently promoted
|
# 1. Find all metadata files newer then the one currently promoted
|
||||||
# 2. If any of them have all the jobs reported back that we're interested in then promote it
|
# 2. If any of them have all the jobs reported back that we're interested in then promote it
|
||||||
# o Bumb current-tripleo on the dlrn server
|
# o Bumb current-tripleo on the dlrn server
|
||||||
# o Bump current-tripleo on this server
|
# o Bump current-tripleo on this server
|
||||||
# ./promote.sh linkname jobname [jobname] ...
|
# ./promote.sh release linkname promote-jobname test-jobname [test-jobname] ...
|
||||||
|
|
||||||
# Yes this doesn't attempt to remove anything, that will be a exercise for later
|
RELEASE=$1
|
||||||
|
LINKNAME=$2
|
||||||
|
PROMOTE_JOBNAME=$3
|
||||||
|
|
||||||
BASEDIR=/var/www/html/builds
|
BASEDIR=/var/www/html/builds-$RELEASE
|
||||||
CURRENT=$BASEDIR/$1
|
CURRENT=$BASEDIR/$LINKNAME
|
||||||
CURRENT_META=$BASEDIR/current-tripleo/metadata.txt
|
CURRENT_META=$CURRENT/metadata.txt
|
||||||
JOB_URL=https://ci.centos.org/job/tripleo-dlrn-promote/buildWithParameters
|
JOB_URL=https://ci.centos.org/job/$PROMOTE_JOBNAME/buildWithParameters
|
||||||
|
|
||||||
|
shift
|
||||||
|
shift
|
||||||
shift
|
shift
|
||||||
|
|
||||||
# Working with relative paths is easier as we need to set relative links on the dlrn server
|
# Working with relative paths is easier as we need to set relative links on the dlrn server
|
||||||
cd $BASEDIR
|
pushd $BASEDIR
|
||||||
|
|
||||||
|
mkdir -p $CURRENT
|
||||||
|
|
||||||
if [ -f $CURRENT_META ] ; then
|
if [ -f $CURRENT_META ] ; then
|
||||||
DIRS2TEST=$(find . -newer $CURRENT_META -name metadata.txt | xargs --no-run-if-empty ls -t)
|
DIRS2TEST=$(find . -newer $CURRENT_META -name metadata.txt | xargs --no-run-if-empty ls -t)
|
||||||
|
@ -46,9 +53,12 @@ for DIR in $DIRS2TEST ; do
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
|
|
||||||
# Remove any files older then 1 day that arn't the current-tripleo pin
|
# Remove any files older then 1 day that arn't one of the current pins
|
||||||
find */*/* -type f -name metadata.txt -mtime +0 -not -samefile current-tripleo/metadata.txt | \
|
find */*/* -type f -name metadata.txt -mtime +0 \
|
||||||
|
-not -samefile $LINKNAME/metadata.txt | \
|
||||||
xargs --no-run-if-empty dirname | \
|
xargs --no-run-if-empty dirname | \
|
||||||
xargs --no-run-if-empty -t rm -rf
|
xargs --no-run-if-empty -t rm -rf
|
||||||
# Remove all empty nested directories
|
# Remove all empty nested directories
|
||||||
find . -type d -empty -delete
|
find . -type d -empty -delete
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
Loading…
Reference in New Issue