Add a new 'PULL' job paramater for validation-<lab>-* jobs, as well
as 'bluval-*' jobs; set it to 'false' by default and 'true' for IEC
validation jobs since most IEC jobs run on static Jenkins slaves where
the validation docker images might already be present from previous
runs.
JIRA: VAL-107
Depends-on: Id4b7947a0de7abf07f69812c6deef71919b9041a
Change-Id: Ic2f690d6627f6ae284a27727f3c98fe03960cbda
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
BLUEPRINT={project-name}
VERSION=master
OPTIONAL=false
+ PULL=yes
block: true
- project:
!j2: |
name: OPTIONAL
default: ''
description: 'If set to yes run optional tests'
+ - string:
+ name: PULL
+ default: 'false'
+ description: 'If set to yes pull docker images before run'
############
# SETTINGS #
cwd=$(pwd)
current_user=$(whoami)
is_optional="false"
+pull="false"
info () {
logger -s -t "run_blu_val.info" "$*"
}
# Get options from shell
-while getopts "j:k:u:s:b:l:r:n:ov:" optchar; do
+while getopts "j:k:u:s:b:l:r:n:opv:" optchar; do
case "${optchar}" in
j) cluster_master_ip=${OPTARG} ;;
k) k8s_config_dir=${OPTARG} ;;
n) blueprint_name=${OPTARG} ;;
u) sh_user=${OPTARG} ;;
o) is_optional="true" ;;
+ p) pull="true" ;;
v) version=${OPTARG} ;;
*) echo "Non-option argument: '-${OPTARG}'" >&2
usage
then
options+=" -o"
fi
+if [ "$pull" == "true" ] || [ "$PULL" == "yes" ]
+then
+ options+=" -p"
+fi
set +e
if python3 --version > /dev/null; then