source "${OPENSTACK_CLIENTS_VENV}"/bin/activate
source "${OPENRC_FILE?}"
- if [ -z "${STACK_NAME}" ] ; then
+ if [ ! -z "${STACK_NAME}" ] ; then
openstack stack delete -y "${STACK_NAME}"
- elif [ -z "${STACK_PREFIX}" ] ; then
+ elif [ ! -z "${STACK_PREFIX}" ] ; then
for stack in $(openstack stack list -c 'Stack Name' -f value) ; do
if [[ ${stack} == ${STACK_PREFIX}* ]] ; then
openstack stack delete -y "${stack}"
parameter_string=''
-if [ -z ${IMAGE_NAME} ] ; then
+if [ ! -z ${IMAGE_NAME} ] ; then
parameter_string="${parameter_string} --parameter 'image=${IMAGE_NAME}'"
fi
-if [ -z ${FLAVOR_NAME} ] ; then
+if [ ! -z ${FLAVOR_NAME} ] ; then
parameter_string="${parameter_string} --parameter 'flavor=${FLAVOR_NAME}'"
fi
-if [ -z ${JENKINS_LABELS} ] ; then
+if [ ! -z ${JENKINS_LABELS} ] ; then
parameter_string="${parameter_string} --parameter 'jenkins_labels=${JENKINS_LABELS}'"
fi
pushd maintenance-ci
-if [ -z ${GERRIT_REVIEW} ] ; then
+if [ ! -z ${GERRIT_REVIEW} ] ; then
refspec=$(curl "https://review.fuel-infra.org/changes/?q=${GERRIT_REVIEW}&o=CURRENT_REVISION" | grep '"ref":' | awk -F ": " '{print $2}' | tr -d '"')
-git fetch https://review.fuel-infra.org/tools/sustaining "${refspec}" && git cherry-pick FETCH_HEAD
+git fetch https://review.fuel-infra.org/tools/sustaining "${refspec}" && git cherry-pick -n FETCH_HEAD
fi
-tox --help || sudo apt-get install -y python-tox
+tox --help >/dev/null || sudo apt-get install -y python-tox
tox -e jobs
source ".tox/jobs/bin/activate"
CONFIG_PATH="${WORKSPACE}/../tmp/${JOB_NAME}"
-# JOBS_LIST - Jenkins string parameter. Space separated list of job names to update.
-# Will update all jobs if empty. Example: verify-mos-docs docker-rebuild-fuel-ci
-JOBS_LIST=(${JOBS_LIST})
umask 0077
mkdir -p "${CONFIG_PATH}"
param_order_from_yaml=true
EOF
-jenkins-jobs --conf "${CONFIG_PATH}/jenkins_jobs.ini" update -x common/data "common:mos:mcp" "${JOBS_LIST[@]}"
+jenkins-jobs --conf "${CONFIG_PATH}/jenkins_jobs.ini" update -x common/data "common:mos:mcp"
popd
cd "views/${CI_NAME}"
-if [ -n "$VIEWS_LIST" ] ; then
- VIEWS_LIST=(${VIEWS_LIST})
-else
- VIEWS_LIST=(*)
-fi
-
-jenkins-view-builder update -x common/data --conf "${CONFIG_PATH}/jenkins_jobs.ini" "${VIEWS_LIST[@]}"
+jenkins-view-builder update -x common/data --conf "${CONFIG_PATH}/jenkins_jobs.ini"
popd