Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a nightly pipeline for GA/EUS releases #4046

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 85 additions & 22 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,15 @@ 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]+/'
atodorov marked this conversation as resolved.
Show resolved Hide resolved

.upstream_and_ga_rules_all:
rules:
- if: '$CI_PIPELINE_SOURCE != "schedule" && $RUNNER'

.nightly_rules_all:
rules:
Expand All @@ -74,6 +78,14 @@ init:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-9.5-[^ga][\S]+/ && $RUNNER =~ "/^.*(x86_64).*$/" && $NIGHTLY == "true" && $RHEL_MAJOR == "9"'

.ga_rules_all:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-[\S]+-(?:(?:ga)|(?:eus))[\S]+/ && $NIGHTLY == "false"'

.ga_rules_x86_64:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-[\S]+-(?:(?:ga)|(?:eus))[\S]+/ && $RUNNER =~ "/^.*(x86_64).*$/" && $NIGHTLY == "false"'


.RPM_RUNNERS_RHEL: &RPM_RUNNERS_RHEL
RUNNER:
Expand All @@ -87,6 +99,7 @@ RPM:
extends: .terraform
rules:
- !reference [.build_rules, rules]
- !reference [.ga_rules_all, rules]
script:
- sh "schutzbot/mockbuild.sh"
parallel:
Expand Down Expand Up @@ -123,7 +136,8 @@ Container:
stage: rpmbuild
extends: .terraform
rules:
- !reference [.build_rules, rules]
- !reference [.upstream_and_ga_rules_all, rules]
- !reference [.ga_rules_all, rules]
script:
- sh "schutzbot/containerbuild.sh"
parallel:
Expand All @@ -135,7 +149,8 @@ Packer:
stage: test
extends: .terraform
rules:
- if: '$CI_PIPELINE_SOURCE != "schedule"'
- !reference [.upstream_and_ga_rules_all, rules]
- !reference [.ga_rules_all, rules]
script:
- tools/ci-build-worker-packer.sh
variables:
Expand Down Expand Up @@ -167,6 +182,7 @@ Base:
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.nightly_rules_all, rules]
- !reference [.ga_rules_all, rules]
script:
- schutzbot/deploy.sh
- /usr/libexec/tests/osbuild-composer/base_tests.sh
Expand All @@ -192,6 +208,7 @@ Base:
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.nightly_rules_all, rules]
- !reference [.ga_rules_all, rules]
script:
- schutzbot/deploy.sh
- /usr/libexec/tests/osbuild-composer/${SCRIPT}
Expand Down Expand Up @@ -229,23 +246,28 @@ regression-composer-works-behind-satellite:

regression-excluded-dependency:
extends: .regression
rules:
# WHITELIST
- if: $RUNNER =~ "/^.*(rhel-8.*|rhel-9.*|centos-stream-9).*$/" && $CI_PIPELINE_SOURCE != "schedule"
rules:
# WHITELIST & BLACKLIST: excluding GA runners from the PR pipeline
- if: $RUNNER =~ "/^.*(rhel-8.*|rhel-9.*|centos-stream-9).*$/" && $CI_PIPELINE_SOURCE != "schedule" && $RUNNER !~ /[\S]+rhel-[\S]+-(?:(?:ga)|(?:eus))[\S]+/
- !reference [.nightly_rules_all, rules]
- !reference [.ga_rules_all, rules]
variables:
SCRIPT: regression-excluded-dependency.sh

regression-include-excluded-packages:
extends: .regression
rules:
# BLACKLIST: Skipped on fedora systems
- if: $RUNNER !~ "/^.*(fedora).*$/" && $CI_PIPELINE_SOURCE != "schedule"
# BLACKLIST: Skipped on fedora systems & excluding GA runners from the PR pipeline
- if: $RUNNER !~ "/^.*(fedora).*$/" && $CI_PIPELINE_SOURCE != "schedule" && $RUNNER !~ /[\S]+rhel-[\S]+-(?:(?:ga)|(?:eus))[\S]+/
jrusz marked this conversation as resolved.
Show resolved Hide resolved
- !reference [.nightly_rules_all, rules]
- !reference [.ga_rules_all, rules]
variables:
SCRIPT: regression-include-excluded-packages.sh

regression-old-worker-new-composer:
rules:
- !reference [.upstream_and_ga_rules_all, rules]
- !reference [.ga_rules_all, rules]
parallel:
matrix:
- RUNNER:
Expand All @@ -259,19 +281,21 @@ regression-old-worker-new-composer:
regression-insecure-repo:
extends: .regression
rules:
# WHITELIST
- if: $RUNNER =~ "/^.*(rhel-*).*$/" && $CI_PIPELINE_SOURCE != "schedule"
# WHITELIST & BLACKLIST: excluding GA runners from the PR pipeline
- if: $RUNNER =~ "/^.*(rhel-*).*$/" && $CI_PIPELINE_SOURCE != "schedule" && $RUNNER !~ /[\S]+rhel-[\S]+-(?:(?:ga)|(?:eus))[\S]+/
jrusz marked this conversation as resolved.
Show resolved Hide resolved
- !reference [.nightly_rules_all, rules]
- !reference [.ga_rules_all, rules]
variables:
SCRIPT: regression-insecure-repo.sh


regression-no-explicit-rootfs-definition:
extends: .regression
rules:
# BLACKLIST: Skipped on fedora systems
- if: $RUNNER !~ "/^.*(fedora).*$/" && $CI_PIPELINE_SOURCE != "schedule"
# BLACKLIST: Skipped on fedora systems & excluding GA runners from the PR pipeline
- if: $RUNNER !~ "/^.*(fedora).*$/" && $CI_PIPELINE_SOURCE != "schedule" && $RUNNER !~ /[\S]+rhel-[\S]+-(?:(?:ga)|(?:eus))[\S]+/
jrusz marked this conversation as resolved.
Show resolved Hide resolved
- !reference [.nightly_rules_all, rules]
- !reference [.ga_rules_all, rules]
variables:
SCRIPT: regression-no-explicit-rootfs-definition.sh

Expand Down Expand Up @@ -308,6 +332,7 @@ Trigger-rhel-edge-ci:
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.nightly_rules_all, rules]
- !reference [.ga_rules_all, rules]
script:
- schutzbot/deploy.sh
- /usr/libexec/tests/osbuild-composer/${SCRIPT}
Expand Down Expand Up @@ -348,7 +373,8 @@ koji.sh (cloud upload):
stage: test
extends: .terraform
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.upstream_and_ga_rules_all, rules]
- !reference [.ga_rules_all, rules]
script:
- schutzbot/deploy.sh
- /usr/libexec/tests/osbuild-composer/koji.sh cloud-upload ${CLOUD_TARGET} ${IMAGE_TYPE}
Expand Down Expand Up @@ -377,7 +403,8 @@ koji.sh (cloudapi):
extends: .integration
# Not supported in nightly pipelines
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.upstream_and_ga_rules_all, rules]
- !reference [.ga_rules_all, rules]
variables:
SCRIPT: koji.sh
parallel:
Expand All @@ -391,7 +418,7 @@ koji.sh (cloudapi):
aws.sh:
extends: .integration
rules:
- if: '$CI_PIPELINE_SOURCE != "schedule" && $RUNNER !~ /[\S]+rhel-8.4-[\S]+/'
- if: '$CI_PIPELINE_SOURCE != "schedule" && $RUNNER !~ /[\S]+rhel-[\S]+-(?:(?:ga)|(?:eus))[\S]+/'
- if: '$CI_PIPELINE_SOURCE == "schedule" && $RUNNER =~ /[\S]+rhel-9.5-[^ga][\S]+/ && $NIGHTLY == "true" && $RHEL_MAJOR == "9"'
variables:
SCRIPT: aws.sh
Expand All @@ -401,6 +428,7 @@ oci.sh:
rules:
# Run only on x86_64
- !reference [.upstream_rules_x86_64, rules]
- !reference [.ga_rules_x86_64, rules]
variables:
SCRIPT: oci.sh

Expand All @@ -422,6 +450,7 @@ azure.sh:
# Run only on x86_64
- !reference [.upstream_rules_x86_64, rules]
- !reference [.nightly_rules_x86_64, rules]
- !reference [.ga_rules_x86_64, rules]
variables:
SCRIPT: azure.sh

Expand All @@ -431,6 +460,7 @@ azure.sh_hyperv_gen2:
# Run only on x86_64
- !reference [.upstream_rules_x86_64, rules]
- !reference [.nightly_rules_x86_64, rules]
- !reference [.ga_rules_x86_64, rules]
variables:
SCRIPT: azure_hyperv_gen2.sh

Expand All @@ -440,6 +470,7 @@ gcp.sh:
rules:
- !reference [.upstream_rules_x86_64, rules]
- !reference [.nightly_rules_x86_64, rules]
- !reference [.ga_rules_x86_64, rules]
variables:
SCRIPT: gcp.sh

Expand All @@ -449,6 +480,7 @@ vmware.sh_vmdk:
# Run only on x86_64
- !reference [.upstream_rules_x86_64, rules]
- !reference [.nightly_rules_x86_64, rules]
- !reference [.ga_rules_x86_64, rules]
variables:
SCRIPT: vmware.sh vmdk

Expand All @@ -458,6 +490,7 @@ vmware.sh_ova:
# Run only on x86_64
- !reference [.upstream_rules_x86_64, rules]
- !reference [.nightly_rules_x86_64, rules]
- !reference [.ga_rules_x86_64, rules]
variables:
SCRIPT: vmware.sh ova

Expand Down Expand Up @@ -492,7 +525,8 @@ API:
stage: test
extends: .terraform
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.upstream_and_ga_rules_all, rules]
- !reference [.ga_rules_all, rules]
# note: cloud API is not supported for on-prem installations so
# don't run this test case for nightly trees
script:
Expand Down Expand Up @@ -523,7 +557,8 @@ API-module-hotfixes:
stage: test
extends: .terraform
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.upstream_and_ga_rules_all, rules]
- !reference [.ga_rules_all, rules]
# note: cloud API is not supported for on-prem installations so
# don't run this test case for nightly trees
script:
Expand Down Expand Up @@ -551,6 +586,7 @@ API-module-hotfixes:
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.nightly_rules_all, rules]
- !reference [.ga_rules_all, rules]
script:
- schutzbot/deploy.sh
- /usr/libexec/tests/osbuild-composer/${SCRIPT}
Expand All @@ -576,6 +612,7 @@ ubi-wsl.sh:
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.nightly_rules_all, rules]
- !reference [.ga_rules_all, rules]
script:
- schutzbot/deploy.sh
- /usr/libexec/tests/osbuild-composer/ubi-wsl.sh
Expand All @@ -592,6 +629,7 @@ weldr-distro-dot-notation+aliases:
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.nightly_rules_all, rules]
- !reference [.ga_rules_all, rules]
script:
- schutzbot/deploy.sh
- /usr/libexec/tests/osbuild-composer/weldr-distro-dot-notation-and-aliases.sh
Expand All @@ -606,8 +644,9 @@ weldr-distro-dot-notation+aliases:
extends: .libvirt_integration
rules:
# BLACKLIST
- if: $RUNNER !~ "/^.*(rhel-9.5).*$/" && $CI_PIPELINE_SOURCE != "schedule" && $NIGHTLY != "true"
- if: $RUNNER !~ "/^.*(rhel-9.5).*$/" && $CI_PIPELINE_SOURCE != "schedule" && $NIGHTLY != "true" && $RUNNER !~ /[\S]+rhel-[\S]+-(?:(?:ga)|(?:eus))[\S]+/
- !reference [.nightly_rules_all, rules]
- !reference [.ga_rules_all, rules]

generic_s3_http.sh:
extends: .generic_s3
Expand All @@ -633,7 +672,8 @@ RHEL 9 on 8:
stage: test
extends: .terraform
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.upstream_and_ga_rules_all, rules]
- !reference [.ga_rules_all, rules]
script:
- schutzbot/deploy.sh
- /usr/libexec/tests/osbuild-composer/koji.sh
Expand Down Expand Up @@ -673,7 +713,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:" nightly

NIGHTLY_SUCCESS:
stage: finish
Expand All @@ -682,14 +722,34 @@ NIGHTLY_SUCCESS:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" && $NIGHTLY == "true"'
script:
- schutzbot/slack_notification.sh SUCCESS ":partymeow:"
- schutzbot/slack_notification.sh SUCCESS ":partymeow:" nightly

GA_FAIL:
stage: finish
tags:
- shell
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" && $NIGHTLY== "false"'
when: on_failure
script:
- schutzbot/slack_notification.sh FAILED ":big-sad:" ga

GA_SUCCESS:
stage: finish
tags:
- shell
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" && $NIGHTLY== "false"'
script:
- schutzbot/slack_notification.sh SUCCESS ":partymeow:" ga

Installer:
stage: test
extends: .terraform/openstack
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.nightly_rules_all, rules]
- !reference [.ga_rules_all, rules]
script:
- schutzbot/deploy.sh
- /usr/libexec/tests/osbuild-composer/installers.sh
Expand All @@ -704,6 +764,7 @@ ContainerUpload:
extends: .terraform
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.ga_rules_all, rules]
script:
- schutzbot/deploy.sh
- /usr/libexec/tests/osbuild-composer/container-upload.sh
Expand All @@ -718,6 +779,7 @@ ContainerEmbedding:
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.nightly_rules_all, rules]
- !reference [.ga_rules_all, rules]
script:
- schutzbot/deploy.sh
- /usr/libexec/tests/osbuild-composer/container-embedding.sh
Expand All @@ -734,6 +796,7 @@ WorkerExecutor:
extends: .terraform
rules:
- !reference [.upstream_rules_all, rules]
- !reference [.ga_rules_all, rules]
script:
- schutzbot/deploy.sh
- /usr/libexec/tests/osbuild-composer/worker-executor.sh
Expand Down
6 changes: 5 additions & 1 deletion schutzbot/slack_notification.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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="\"GA composes 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 \
Expand Down
Loading