Remove promotion logic from the toci scripts
The image upload is now going to be handled by the periodic jobs on rdocloud and the promotion by the dlrnapi_promoter script. Depends-On: Id9e08bc5938a8d8daad0203293ac1e266aa65326 Change-Id: I8a83c1a47e0a8a5ba0a11fee6f9fed3edd97af76
This commit is contained in:
parent
8c351fc6cf
commit
3b766679e9
|
@ -441,30 +441,6 @@ function subnodes_scp_deploy_env {
|
|||
done
|
||||
}
|
||||
|
||||
function can_promote {
|
||||
# If we got this far and its a periodic job, declare success and upload build artifacts
|
||||
# but only if we are testing no changes or a single change only in tripleo_ci
|
||||
if [[ -z ${ZUUL_CHANGES:-''} ]]; then
|
||||
# Periodic jobs can always promote
|
||||
return 0
|
||||
fi
|
||||
|
||||
CHANGES=( ${ZUUL_CHANGES//^/ } )
|
||||
NUM_CHANGES=${#CHANGES[@]}
|
||||
|
||||
OTHER_PROJECTS="no"
|
||||
for change in ${CHANGES[@]-}; do
|
||||
if [[ ! "$change" =~ 'openstack-infra/tripleo-ci' ]]; then
|
||||
OTHER_PROJECTS="yes"
|
||||
fi
|
||||
done
|
||||
if [[ $NUM_CHANGES -le 1 && $OTHER_PROJECTS == "no" ]]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function stop_dstat {
|
||||
ps axjf | grep bin/dstat | grep -v grep | awk '{print $2;}' | sudo xargs -t -n 1 -r kill
|
||||
}
|
||||
|
|
|
@ -275,26 +275,4 @@ else
|
|||
./toci_quickstart.sh
|
||||
fi
|
||||
|
||||
export http_proxy=
|
||||
# TODO(gcerami) expand this list
|
||||
JOBS_ALLOW_PROMOTE=(periodic-ovb-3ctlr_1comp-featureset002 periodic-ovb-1ctlr_1comp_1ceph-featureset024)
|
||||
# TODO(gcerami) move the remaining condition in can_promote function ?
|
||||
if item_in_array $TOCI_JOBTYPE ${JOBS_ALLOW_PROMOTE[@]} && can_promote; then
|
||||
UPLOAD_FOLDER=builds${STABLE_RELEASE:+-$STABLE_RELEASE}
|
||||
TRUNKREPOUSED=$(grep -Eom 1 "[0-9a-z]{2}/[0-9a-z]{2}/[0-9a-z]{40}_[0-9a-z]+" /etc/yum.repos.d/delorean.repo)
|
||||
# only allow the first item on the list to upload an image
|
||||
if [[ $TOCI_JOBTYPE == ${JOBS_ALLOW_PROMOTE[0]} ]]; then
|
||||
# There's no easy way to extract the information on where the images are built, so this value
|
||||
# must be manually set as the same value as images_working_dir in toci-quickstart/config/testenv/ovb.yml
|
||||
pushd ~
|
||||
curl http://$MIRRORIP/cgi-bin/upload.cgi -F "repohash=$TRUNKREPOUSED" -F "folder=$UPLOAD_FOLDER" -F "upload=@ironic-python-agent.tar;filename=ipa_images.tar"
|
||||
curl http://$MIRRORIP/cgi-bin/upload.cgi -F "repohash=$TRUNKREPOUSED" -F "folder=$UPLOAD_FOLDER" -F "upload=@overcloud-full.tar;filename=overcloud-full.tar"
|
||||
curl http://$MIRRORIP/cgi-bin/upload.cgi -F "repohash=$TRUNKREPOUSED" -F "folder=$UPLOAD_FOLDER" -F "upload=@ironic-python-agent.tar.md5;filename=ipa_images.tar.md5"
|
||||
curl http://$MIRRORIP/cgi-bin/upload.cgi -F "repohash=$TRUNKREPOUSED" -F "folder=$UPLOAD_FOLDER" -F "upload=@overcloud-full.tar.md5;filename=overcloud-full.tar.md5"
|
||||
popd
|
||||
fi
|
||||
# if everything is ok, mark job as success
|
||||
curl http://$MIRRORIP/cgi-bin/upload.cgi -F "repohash=$TRUNKREPOUSED" -F "folder=$UPLOAD_FOLDER" -F "$JOB_NAME=SUCCESS"
|
||||
fi
|
||||
|
||||
echo "Run completed"
|
||||
|
|
|
@ -116,21 +116,4 @@ REMAINING_TIME=${REMAINING_TIME:-180}
|
|||
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
|
||||
tar -C ~ -cf - ironic-python-agent.initramfs ironic-python-agent.vmlinuz ironic-python-agent.kernel > ipa_images.tar
|
||||
tar -C ~ -cf - overcloud-full.qcow2 overcloud-full.initrd overcloud-full.vmlinuz > overcloud-full.tar
|
||||
|
||||
md5sum overcloud-full.tar > overcloud-full.tar.md5
|
||||
md5sum ipa_images.tar > ipa_images.tar.md5
|
||||
|
||||
UPLOAD_FOLDER=builds${STABLE_RELEASE:+-$STABLE_RELEASE}
|
||||
curl http://$MIRRORSERVER/cgi-bin/upload.cgi -F "repohash=$TRUNKREPOUSED" -F "folder=$UPLOAD_FOLDER" -F "upload=@ipa_images.tar;filename=ipa_images.tar"
|
||||
curl http://$MIRRORSERVER/cgi-bin/upload.cgi -F "repohash=$TRUNKREPOUSED" -F "folder=$UPLOAD_FOLDER" -F "upload=@overcloud-full.tar;filename=overcloud-full.tar"
|
||||
# TODO(pabelanger): Remove qcow2 format, since centos-7 cannot mount nbd with the default kernel.
|
||||
curl http://$MIRRORSERVER/cgi-bin/upload.cgi -F "repohash=$TRUNKREPOUSED" -F "folder=$UPLOAD_FOLDER" -F "upload=@ipa_images.tar.md5;filename=ipa_images.tar.md5"
|
||||
curl http://$MIRRORSERVER/cgi-bin/upload.cgi -F "repohash=$TRUNKREPOUSED" -F "folder=$UPLOAD_FOLDER" -F "upload=@overcloud-full.tar.md5;filename=overcloud-full.tar.md5"
|
||||
curl http://$MIRRORSERVER/cgi-bin/upload.cgi -F "repohash=$TRUNKREPOUSED" -F "folder=$UPLOAD_FOLDER" -F "$JOB_NAME=SUCCESS"
|
||||
fi
|
||||
|
||||
echo 'Run completed.'
|
||||
|
|
Loading…
Reference in New Issue