Merge "Stop deployment before jobs end"

This commit is contained in:
Jenkins 2017-03-29 16:32:06 +00:00 committed by Gerrit Code Review
commit f422abf5d0
6 changed files with 18 additions and 6 deletions

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash
source $(dirname $0)/scripts/common_vars.bash
export START_JOB_TIME=$(date +%s)
# Maintain compatibility with the old jobtypes
if [[ ! $TOCI_JOBTYPE =~ "featureset" ]]; then

View File

@ -10,6 +10,7 @@ NODEPOOL_MIRROR_HOST=${NODEPOOL_MIRROR_HOST:-mirror.$NODEPOOL_REGION.$NODEPOOL_C
NODEPOOL_MIRROR_HOST=$(echo $NODEPOOL_MIRROR_HOST|tr '[:upper:]' '[:lower:]')
export CENTOS_MIRROR=http://$NODEPOOL_MIRROR_HOST/centos
export EPEL_MIRROR=http://$NODEPOOL_MIRROR_HOST/epel
export START_JOB_TIME=$(date +%s)
if [ $NODEPOOL_CLOUD == 'tripleo-test-cloud-rh1' ]; then
source $(dirname $0)/scripts/rh2.env

View File

@ -72,7 +72,10 @@ $TRIPLEO_ROOT/tripleo-quickstart/quickstart.sh --install-deps
pushd $TRIPLEO_ROOT/tripleo-quickstart/
$TRIPLEO_ROOT/tripleo-quickstart/quickstart.sh --bootstrap --no-clone \
# Use $REMAINING_TIME of infra to calculate maximum time for remaning part of job
# Leave 15 minutes for quickstart logs collection
TIME_FOR_DEPLOY=$(( REMAINING_TIME - ($(date +%s) - START_JOB_TIME)/60 - 15 ))
/usr/bin/timeout --preserve-status ${TIME_FOR_DEPLOY}m $TRIPLEO_ROOT/tripleo-quickstart/quickstart.sh --bootstrap --no-clone \
-t all \
$PLAYBOOK $OOOQ_ARGS \
$OOOQ_DEFAULT_ARGS $EXTRA_ARGS undercloud 2>&1 \

View File

@ -156,7 +156,10 @@ sudo update-ca-trust extract
# add it to the br-ctlplane bridge.
sudo ip link add ci-dummy type dummy
$TRIPLEO_ROOT/tripleo-ci/scripts/deploy.sh
# Use $REMAINING_TIME of infra to calculate maximum time for remaning part of job
# Leave 10 minutes for postci function
TIME_FOR_DEPLOY=$(( REMAINING_TIME - ($(date +%s) - START_JOB_TIME)/60 - 10 ))
/usr/bin/timeout --preserve-status ${TIME_FOR_DEPLOY}m $TRIPLEO_ROOT/tripleo-ci/scripts/deploy.sh
if [[ $CACHEUPLOAD == 1 && can_promote ]] ; then
UPLOAD_FOLDER=builds${STABLE_RELEASE:+-$STABLE_RELEASE}
curl http://$MIRRORSERVER/cgi-bin/upload.cgi -F "repohash=$TRUNKREPOUSED" -F "folder=$UPLOAD_FOLDER" -F "$JOB_NAME=SUCCESS"

View File

@ -110,7 +110,10 @@ fi
cp -f $TE_DATAFILE ~/instackenv.json
$TRIPLEO_ROOT/tripleo-ci/scripts/deploy.sh
# Use $REMAINING_TIME of infra to calculate maximum time for remaning part of job
# Leave 10 minutes for postci function
TIME_FOR_DEPLOY=$(( REMAINING_TIME - ($(date +%s) - START_JOB_TIME)/60 - 10 ))
/usr/bin/timeout --preserve-status ${TIME_FOR_DEPLOY}m $TRIPLEO_ROOT/tripleo-ci/scripts/deploy.sh
if [[ $CACHEUPLOAD == 1 && can_promote ]] ; then
# Get the IPA and overcloud images for caching

View File

@ -6,7 +6,6 @@ export ANSIBLE_NOCOLOR=1
LOCAL_WORKING_DIR="$WORKSPACE/.quickstart"
WORKING_DIR="$HOME"
LOGS_DIR=$WORKSPACE/logs
QUICKSTART_INSTALL_TIMEOUT=$((REMAINING_TIME - 15))
## Signal to toci_gate_test.sh we've started by
@ -63,8 +62,10 @@ pushd $TRIPLEO_ROOT/tripleo-quickstart/
$QUICKSTART_PREPARE_CMD
# Save time for log collection
/usr/bin/timeout --preserve-status ${QUICKSTART_INSTALL_TIMEOUT}m $QUICKSTART_INSTALL_CMD \
# Use $REMAINING_TIME of infra to calculate maximum time for remaning part of job
# Leave 15 minutes for quickstart logs collection
TIME_FOR_DEPLOY=$(( REMAINING_TIME - ($(date +%s) - START_JOB_TIME)/60 - 15 ))
/usr/bin/timeout --preserve-status ${TIME_FOR_DEPLOY}m $QUICKSTART_INSTALL_CMD \
2>&1 | tee $LOGS_DIR/quickstart_install.log && exit_value=0 || exit_value=$?
## LOGS COLLECTION