diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ab18cb2a9..dff3cca73 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -122,7 +122,7 @@ Regression: extends: .terraform rules: - if: '$CI_PIPELINE_SOURCE != "schedule"' - - if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-[8-9]\.[\S]+/' + - if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-[8-9]\.[\S]+/ && $NIGHTLY == "true"' script: - schutzbot/deploy.sh - /usr/libexec/tests/osbuild-composer/regression.sh @@ -288,7 +288,7 @@ Installer: extends: .terraform rules: - if: '$CI_PIPELINE_SOURCE != "schedule"' - - if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-[8-9]\.[\S]+/' + - if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-[8-9]\.[\S]+/ && $NIGHTLY == "true"' script: - schutzbot/deploy.sh - /usr/libexec/tests/osbuild-composer/installers.sh diff --git a/schutzbot/deploy.sh b/schutzbot/deploy.sh index 2751448fd..3f7e683cc 100755 --- a/schutzbot/deploy.sh +++ b/schutzbot/deploy.sh @@ -103,7 +103,7 @@ if [ -f "rhel8internal.repo" ]; then sudo mv rhel8internal.repo /etc/yum.repos.d/ # Use osbuild from schutzfile if desired for testing custom osbuild-composer packages # specified by $REPO_URL in ENV and used in prepare-rhel-internal.sh - if [ "$SCHUTZ_OSBUILD" == 1 ]; then + if [ "${SCHUTZ_OSBUILD:=false}" == true ]; then sudo rm -f /etc/yum.repos.d/osbuild-composer.repo else sudo rm -f /etc/yum.repos.d/osbuild*.repo diff --git a/schutzbot/prepare-rhel-internal.sh b/schutzbot/prepare-rhel-internal.sh index 9f5a7bdfd..c1d9e8311 100755 --- a/schutzbot/prepare-rhel-internal.sh +++ b/schutzbot/prepare-rhel-internal.sh @@ -64,7 +64,7 @@ cp rhel-8.json rhel-8-beta.json JOB_NAME="${JOB_NAME:-${CI_JOB_ID}}" # Do not create tests repo if it's provided from ENV -if [ -z "$REPO_URL" ]; then +if [ -z "${REPO_URL+x}" ]; then greenprint "📦 Installing requirements" sudo dnf -y install createrepo_c wget python3-pip