tripleo-ci/scripts/to_build
Sagi Shnaidman 1e0099dc0b Fix periodic jobs release detection
If periodic job, than use consistent-$release var for setting
consistent repos for job.
Use PERIODIC variable instead of CACHEUPLOAD.

Change-Id: Icea46e38b487cddc876f2a4a2d44b1aa8e45dfed
2017-06-20 16:59:58 +03:00

19 lines
636 B
Bash
Executable File

#!/bin/bash
function set_env {
export TO_BUILD=$1
echo $TO_BUILD
exit
}
# If we are uploading to the cache then we shouldn't use it
[[ "$PERIODIC" == 1 ]] && set_env "true"
# The updates job already takes a long time, always use cache for it
[[ "$TOCI_JOBTYPE" =~ updates ]] && set_env "false"
# There are some projects that require images building
for PROJFULLREF in ${ZUUL_CHANGES//^/ };
do
PROJ=${PROJFULLREF%%:*};
PROJ=${PROJ##*/};
[[ "$PROJ" =~ diskimage-builder|tripleo-image-elements|tripleo-puppet-elements|instack-undercloud|python-tripleoclient|tripleo-common ]] && set_env "true"
done
set_env "false"