From 49051930d31ee660808994766efcaff3b0656492 Mon Sep 17 00:00:00 2001 From: Tom Koscielniak Date: Thu, 28 Mar 2024 14:25:23 +0100 Subject: [PATCH] Create new nightly pipeline for GA/EUS images --- .gitlab-ci.yml | 81 ++++++++++++++++++++++++++++++--- schutzbot/slack_notification.sh | 6 ++- 2 files changed, 79 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25c7c4f3c42..60b66d83923 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,11 +60,11 @@ init: .upstream_rules_all: rules: - - if: '$CI_PIPELINE_SOURCE != "schedule"' + - if: '$CI_PIPELINE_SOURCE != "schedule" && $RUNNER !~ /[\S]+rhel-[\S]+-(?:(?:ga)|(?:eus))[\S]+/' .upstream_rules_x86_64: rules: - - if: '$CI_PIPELINE_SOURCE != "schedule" && $RUNNER =~ "/^.*(x86_64).*$/"' + - if: '$CI_PIPELINE_SOURCE != "schedule" && $RUNNER =~ "/^.*(x86_64).*$/" && $RUNNER !~ /[\S]+rhel-[\S]+-(?:(?:ga)|(?:eus))[\S]+/' .nightly_rules_all: rules: @@ -76,6 +76,15 @@ init: - if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-9.4-[^ga][\S]+/ && $RUNNER =~ "/^.*(x86_64).*$/" && $NIGHTLY == "true" && $RHEL_MAJOR == "9"' - if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-8.10-[^ga][\S]+/ && $RUNNER =~ "/^.*(x86_64).*$/" && $NIGHTLY == "true" && $RHEL_MAJOR == "8"' +.nightly_rules_ga/eus: + rules: + - if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-[\S]+-(?:(?:ga)|(?:eus))[\S]+/ && $NIGHTLY_GA== "true"' + - if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-[\S]+-(?:(?:ga)|(?:eus))[\S]+/ && $NIGHTLY_GA == "true"' + +.nightly_rules_ga/eus_x86_64: + rules: + - if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-[\S]+-(?:(?:ga)|(?:eus))[\S]+/ && $RUNNER =~ "/^.*(x86_64).*$/" && $NIGHTLY_GA== "true"' + - if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-[\S]+-(?:(?:ga)|(?:eus))[\S]+/ && $RUNNER =~ "/^.*(x86_64).*$/" && $NIGHTLY_GA == "true"' .RPM_RUNNERS_RHEL: &RPM_RUNNERS_RHEL RUNNER: @@ -127,11 +136,28 @@ Build -tests RPM for RHEL: matrix: - <<: *RPM_RUNNERS_RHEL +RPM for RHEL-GA: + stage: rpmbuild + extends: .terraform + rules: + - !reference [.nightly_rules_ga/eus, rules] + script: + - sh "schutzbot/mockbuild.sh" + parallel: + matrix: + - RUNNER: + - aws/rhel-8.4-ga-x86_64 + - aws/rhel-8.4-ga-aarch64 + - aws/rhel-8.9-ga-x86_64 + - aws/rhel-8.9-ga-aarch64 + - aws/rhel-9.3-ga-x86_64 + - aws/rhel-9.3-ga-aarch64 + Container: stage: rpmbuild extends: .terraform rules: - - !reference [.build_rules, rules] + - !reference [.nightly_rules_ga/eus, rules] script: - sh "schutzbot/containerbuild.sh" parallel: @@ -143,7 +169,7 @@ Packer: stage: test extends: .terraform rules: - - if: '$CI_PIPELINE_SOURCE != "schedule"' + - !reference [.nightly_rules_ga/eus, rules] script: - tools/ci-build-worker-packer.sh variables: @@ -176,6 +202,7 @@ Base: rules: - !reference [.upstream_rules_all, rules] - !reference [.nightly_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] script: - schutzbot/deploy.sh - /usr/libexec/tests/osbuild-composer/base_tests.sh @@ -209,6 +236,7 @@ Base: rules: - !reference [.upstream_rules_all, rules] - !reference [.nightly_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] script: - schutzbot/deploy.sh - /usr/libexec/tests/osbuild-composer/${SCRIPT} @@ -273,6 +301,8 @@ regression-include-excluded-packages: SCRIPT: regression-include-excluded-packages.sh regression-old-worker-new-composer: + rules: + - !reference [.nightly_rules_ga/eus, rules] parallel: matrix: - RUNNER: @@ -337,6 +367,7 @@ Trigger-rhel-edge-ci: rules: - !reference [.upstream_rules_all, rules] - !reference [.nightly_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] script: - schutzbot/deploy.sh - /usr/libexec/tests/osbuild-composer/${SCRIPT} @@ -382,7 +413,7 @@ koji.sh (cloud upload): stage: test extends: .terraform rules: - - !reference [.upstream_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] script: - schutzbot/deploy.sh - /usr/libexec/tests/osbuild-composer/koji.sh cloud-upload ${CLOUD_TARGET} ${IMAGE_TYPE} @@ -412,6 +443,7 @@ koji.sh (cloudapi): # Not supported in nightly pipelines rules: - !reference [.upstream_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] variables: SCRIPT: koji.sh parallel: @@ -437,6 +469,7 @@ oci.sh: rules: # Run only on x86_64 - !reference [.upstream_rules_x86_64, rules] + - !reference [.nightly_rules_ga/eus_x86_64, rules] variables: SCRIPT: oci.sh @@ -458,6 +491,7 @@ azure.sh: # Run only on x86_64 - !reference [.upstream_rules_x86_64, rules] - !reference [.nightly_rules_x86_64, rules] + - !reference [.nightly_rules_ga/eus_x86_64, rules] variables: SCRIPT: azure.sh @@ -467,6 +501,7 @@ azure.sh_hyperv_gen2: # Run only on x86_64 - !reference [.upstream_rules_x86_64, rules] - !reference [.nightly_rules_x86_64, rules] + - !reference [.nightly_rules_ga/eus_x86_64, rules] variables: SCRIPT: azure_hyperv_gen2.sh @@ -476,6 +511,7 @@ gcp.sh: rules: - !reference [.upstream_rules_x86_64, rules] - !reference [.nightly_rules_x86_64, rules] + - !reference [.nightly_rules_ga/eus_x86_64, rules] variables: SCRIPT: gcp.sh @@ -485,6 +521,7 @@ vmware.sh_vmdk: # Run only on x86_64 - !reference [.upstream_rules_x86_64, rules] - !reference [.nightly_rules_x86_64, rules] + - !reference [.nightly_rules_ga/eus_x86_64, rules] variables: SCRIPT: vmware.sh vmdk @@ -494,6 +531,7 @@ vmware.sh_ova: # Run only on x86_64 - !reference [.upstream_rules_x86_64, rules] - !reference [.nightly_rules_x86_64, rules] + - !reference [.nightly_rules_ga/eus_x86_64, rules] variables: SCRIPT: vmware.sh ova @@ -531,6 +569,7 @@ API: extends: .terraform rules: - !reference [.upstream_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] # note: cloud API is not supported for on-prem installations so # don't run this test case for nightly trees script: @@ -564,6 +603,7 @@ API-module-hotfixes: extends: .terraform rules: - !reference [.upstream_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] # note: cloud API is not supported for on-prem installations so # don't run this test case for nightly trees script: @@ -591,6 +631,7 @@ API-module-hotfixes: rules: - !reference [.upstream_rules_all, rules] - !reference [.nightly_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] script: - schutzbot/deploy.sh - /usr/libexec/tests/osbuild-composer/${SCRIPT} @@ -619,6 +660,7 @@ ubi-wsl.sh: rules: - !reference [.upstream_rules_all, rules] - !reference [.nightly_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] script: - schutzbot/deploy.sh - /usr/libexec/tests/osbuild-composer/ubi-wsl.sh @@ -632,6 +674,7 @@ weldr-distro-dot-notation+aliases: rules: - !reference [.upstream_rules_all, rules] - !reference [.nightly_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] script: - schutzbot/deploy.sh - /usr/libexec/tests/osbuild-composer/weldr-distro-dot-notation-and-aliases.sh @@ -674,6 +717,7 @@ RHEL 9 on 8: extends: .terraform rules: - !reference [.upstream_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] script: - schutzbot/deploy.sh - /usr/libexec/tests/osbuild-composer/koji.sh @@ -714,7 +758,7 @@ NIGHTLY_FAIL: - if: '$CI_PIPELINE_SOURCE == "schedule" && $NIGHTLY == "true"' when: on_failure script: - - schutzbot/slack_notification.sh FAILED ":big-sad:" + - schutzbot/slack_notification.sh FAILED ":big-sad:" rhel NIGHTLY_SUCCESS: stage: finish @@ -723,7 +767,26 @@ NIGHTLY_SUCCESS: rules: - if: '$CI_PIPELINE_SOURCE == "schedule" && $NIGHTLY == "true"' script: - - schutzbot/slack_notification.sh SUCCESS ":partymeow:" + - schutzbot/slack_notification.sh SUCCESS ":partymeow:" rhel + +NIGHTLY_GA/EUS_FAIL: + stage: finish + tags: + - shell + rules: + - if: '$CI_PIPELINE_SOURCE == "schedule" && $NIGHTLY_GA== "true"' + when: on_failure + script: + - schutzbot/slack_notification.sh FAILED ":big-sad:" ga + +NIGHTLY_GA/EUS_SUCCESS: + stage: finish + tags: + - shell + rules: + - if: '$CI_PIPELINE_SOURCE == "schedule" && $NIGHTLY_GA== "true"' + script: + - schutzbot/slack_notification.sh SUCCESS ":partymeow:" ga Installer: stage: test @@ -731,6 +794,7 @@ Installer: rules: - !reference [.upstream_rules_all, rules] - !reference [.nightly_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] script: - schutzbot/deploy.sh - /usr/libexec/tests/osbuild-composer/installers.sh @@ -746,6 +810,7 @@ ContainerUpload: extends: .terraform rules: - !reference [.upstream_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] script: - schutzbot/deploy.sh - /usr/libexec/tests/osbuild-composer/container-upload.sh @@ -761,6 +826,7 @@ ContainerEmbedding: rules: - !reference [.upstream_rules_all, rules] - !reference [.nightly_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] script: - schutzbot/deploy.sh - /usr/libexec/tests/osbuild-composer/container-embedding.sh @@ -780,6 +846,7 @@ WorkerExecutor: extends: .terraform rules: - !reference [.upstream_rules_all, rules] + - !reference [.nightly_rules_ga/eus, rules] script: - schutzbot/deploy.sh - /usr/libexec/tests/osbuild-composer/worker-executor.sh diff --git a/schutzbot/slack_notification.sh b/schutzbot/slack_notification.sh index 090754f701e..ab77b3a38d4 100755 --- a/schutzbot/slack_notification.sh +++ b/schutzbot/slack_notification.sh @@ -9,7 +9,11 @@ fi COMPOSE_ID=$(cat COMPOSE_ID) COMPOSER_NVR=$(cat COMPOSER_NVR) -MESSAGE="\"Nightly pipeline execution on *$COMPOSE_ID* with *$COMPOSER_NVR* finished with status *$1* $2 \n QE: @atodorov, @jrusz\n Link to results: $CI_PIPELINE_URL\n For edge testing status please see https://url.corp.redhat.com/edge-pipelines \"" +if [ "$3" == "ga" ]; then + MESSAGE="\"Nightly GA/EUS releases pipeline execution finished with status *$1* $2 \n QE: @atodorov, @jrusz, @tkosciel\n Link to results: $CI_PIPELINE_URL \"" +else + MESSAGE="\"Nightly pipeline execution on *$COMPOSE_ID* with *$COMPOSER_NVR* finished with status *$1* $2 \n QE: @atodorov, @jrusz, @tkosciel\n Link to results: $CI_PIPELINE_URL\n For edge testing status please see https://url.corp.redhat.com/edge-pipelines \"" +fi curl \ -X POST \