From 6571dfd4bb2aafa4c971fe489828d562181dd92f Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Nov 03 2023 21:51:18 +0000 Subject: Drop INSTANCE from prepare_test_env Script is only marginally kept in sync, the instance logic is not useful anymore. Signed-off-by: Georg Pfuetzenreuter --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa60352..d302c44 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ validate: show_highstate: stage: validate before_script: - - bin/prepare_test_env.sh -i opensuse -g -o Leap,15,4 -s + - bin/prepare_test_env.sh -g -o Leap,15,4 -s - bin/get_formulas.py -c -d /srv/formula -s --clone-from 'https://gitlab.infra.opensuse.org/saltstack-formulas' --clone-branch production script: bin/test_show_highstate.sh tags: @@ -32,7 +32,7 @@ show_highstate: upstream_formulas_show_highstate: stage: validate before_script: - - bin/prepare_test_env.sh -i opensuse -g + - bin/prepare_test_env.sh -g - bin/get_formulas.py -c -d /srv/formula -s script: bin/test_show_highstate.sh allow_failure: true @@ -45,7 +45,7 @@ test_haproxy: image: registry.opensuse.org/opensuse/infrastructure/containers/heroes-salt-testing-haproxy:latest stage: test before_script: - - bin/prepare_test_env.sh -i opensuse -g -s + - bin/prepare_test_env.sh -g -s - bin/replace_secrets.sh - bin/get_formulas.py -c -d /srv/formula -s --clone-from 'https://gitlab.infra.opensuse.org/saltstack-formulas' --clone-branch production -f haproxy script: bin/test_haproxy.sh @@ -70,7 +70,7 @@ test_nginx: image: registry.opensuse.org/opensuse/infrastructure/containers/heroes-salt-testing-nginx:latest stage: test before_script: - - bin/prepare_test_env.sh -i opensuse -g -s + - bin/prepare_test_env.sh -g -s - bin/get_formulas.py -c -d /srv/formula -s --clone-from 'https://gitlab.infra.opensuse.org/saltstack-formulas' --clone-branch production -f nginx script: bin/test_nginx.sh tags: @@ -81,7 +81,7 @@ test_nginx: test_sudo: stage: test before_script: - - bin/prepare_test_env.sh -i opensuse -g -s -n + - bin/prepare_test_env.sh -g -s -n - bin/get_formulas.py -c -d /srv/formula -s --clone-from 'https://gitlab.infra.opensuse.org/saltstack-formulas' --clone-branch production script: bin/test_sudo.sh tags: diff --git a/bin/prepare_test_env.sh b/bin/prepare_test_env.sh index e003ea3..100cb25 100755 --- a/bin/prepare_test_env.sh +++ b/bin/prepare_test_env.sh @@ -11,7 +11,6 @@ source /etc/os-release SECRETS="False" REPO_URL=${PRETTY_NAME// /_} PKG='' -INSTANCE='opensuse' if [[ $(whoami) != 'root' ]]; then if [[ -f /usr/bin/sudo ]]; then @@ -27,7 +26,6 @@ help() { echo echo "Arguments:" echo "-p Comma-separated list of additional packages to be installed" - echo "-i Choose gitlab instance. Choices: opensuse, suse" echo "-o OPTIONAL: Specify different OS. Examples: \"Leap,42,3\", \"SLES,12,3\"" echo "-g OPTIONAL: Make preparation for show_highstate" echo "-s OPTIONAL: Include secrets files (disabed because CI runner can't decrypt them due to lack of GPG key)" @@ -37,10 +35,9 @@ help() { [[ $1 == '--help' ]] && help && exit -while getopts p:i:o:gsnh arg; do +while getopts p:o:gsnh arg; do case ${arg} in p) PKG=(${OPTARG//,/ }) ;; - i) INSTANCE=${OPTARG} ;; o) OS=(${OPTARG//,/ }) ;; g) HIGHSTATE=1 ;; s) SECRETS="True" ;; @@ -50,12 +47,8 @@ while getopts p:i:o:gsnh arg; do esac done -[[ -z "$INSTANCE" ]] && help && exit 1 - -if [[ "$INSTANCE" == 'opensuse' ]]; then - DOMAIN='infra.opensuse.org' - SALT_CLUSTER='opensuse' -fi +DOMAIN='infra.opensuse.org' +SALT_CLUSTER='opensuse' if [ -z "$REPOSITORIES" ] then