Add rules to skip distributions when not on main

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2022-10-07 15:42:17 +02:00
parent efd29f1cec
commit f52973217f
2 changed files with 58 additions and 18 deletions

View File

@ -34,12 +34,22 @@ stages:
- scan - scan
- release - release
.main-or-manual:
rules:
- if: $CI_COMMIT_BRANCH == "main"
- if: $CI_PIPELINE_SOURCE == "schedule"
when: manual
# Define the distribution targets # Define the distribution targets
.dist-amazonlinux2: .dist-amazonlinux2:
rules:
- !reference [.main-or-manual, rules]
variables: variables:
DIST: amazonlinux2 DIST: amazonlinux2
.dist-centos7: .dist-centos7:
rules:
- !reference [.main-or-manual, rules]
variables: variables:
DIST: centos7 DIST: centos7
CVE_UPDATES: "cyrus-sasl-lib" CVE_UPDATES: "cyrus-sasl-lib"
@ -50,27 +60,39 @@ stages:
CVE_UPDATES: "cyrus-sasl-lib" CVE_UPDATES: "cyrus-sasl-lib"
.dist-debian10: .dist-debian10:
rules:
- !reference [.main-or-manual, rules]
variables: variables:
DIST: debian10 DIST: debian10
.dist-debian9: .dist-debian9:
rules:
- !reference [.main-or-manual, rules]
variables: variables:
DIST: debian9 DIST: debian9
.dist-fedora35: .dist-fedora35:
rules:
- !reference [.main-or-manual, rules]
variables: variables:
DIST: fedora35 DIST: fedora35
.dist-opensuse-leap15.1: .dist-opensuse-leap15.1:
rules:
- !reference [.main-or-manual, rules]
variables: variables:
DIST: opensuse-leap15.1 DIST: opensuse-leap15.1
.dist-ubi8: .dist-ubi8:
rules:
- !reference [.main-or-manual, rules]
variables: variables:
DIST: ubi8 DIST: ubi8
CVE_UPDATES: "cyrus-sasl-lib" CVE_UPDATES: "cyrus-sasl-lib"
.dist-ubuntu16.04: .dist-ubuntu16.04:
rules:
- !reference [.main-or-manual, rules]
variables: variables:
DIST: ubuntu16.04 DIST: ubuntu16.04
@ -80,6 +102,8 @@ stages:
CVE_UPDATES: "libsasl2-2 libsasl2-modules-db" CVE_UPDATES: "libsasl2-2 libsasl2-modules-db"
.dist-ubuntu20.04: .dist-ubuntu20.04:
rules:
- !reference [.main-or-manual, rules]
variables: variables:
DIST: ubuntu20.04 DIST: ubuntu20.04
CVE_UPDATES: "libsasl2-2 libsasl2-modules-db" CVE_UPDATES: "libsasl2-2 libsasl2-modules-db"
@ -102,6 +126,8 @@ stages:
ARCH: arm64 ARCH: arm64
.arch-ppc64le: .arch-ppc64le:
rules:
- !reference [.main-or-manual, rules]
variables: variables:
ARCH: ppc64le ARCH: ppc64le

View File

@ -262,7 +262,8 @@ image-ubuntu18.04:
needs: needs:
- package-ubuntu18.04-amd64 - package-ubuntu18.04-amd64
- package-ubuntu18.04-arm64 - package-ubuntu18.04-arm64
- package-ubuntu18.04-ppc64le - job: package-ubuntu18.04-ppc64le
optional: true
image-ubuntu20.04: image-ubuntu20.04:
extends: extends:
@ -281,23 +282,36 @@ image-packaging:
- .package-artifacts - .package-artifacts
- .dist-packaging - .dist-packaging
needs: needs:
- package-amazonlinux2-aarch64 - job: package-centos8-aarch64
- package-amazonlinux2-x86_64 - job: package-centos8-x86_64
- package-centos7-ppc64le - job: package-ubuntu18.04-amd64
- package-centos7-x86_64 - job: package-ubuntu18.04-arm64
- package-centos8-aarch64 - job: package-amazonlinux2-aarch64
- package-centos8-ppc64le optional: true
- package-centos8-x86_64 - job: package-amazonlinux2-x86_64
- package-debian10-amd64 optional: true
- package-debian9-amd64 - job: package-centos7-ppc64le
- package-fedora35-aarch64 optional: true
- package-fedora35-x86_64 - job: package-centos7-x86_64
- package-opensuse-leap15.1-x86_64 optional: true
- package-ubuntu16.04-amd64 - job: package-centos8-ppc64le
- package-ubuntu16.04-ppc64le optional: true
- package-ubuntu18.04-amd64 - job: package-debian10-amd64
- package-ubuntu18.04-arm64 optional: true
- package-ubuntu18.04-ppc64le - job: package-debian9-amd64
optional: true
- job: package-fedora35-aarch64
optional: true
- job: package-fedora35-x86_64
optional: true
- job: package-opensuse-leap15.1-x86_64
optional: true
- job: package-ubuntu16.04-amd64
optional: true
- job: package-ubuntu16.04-ppc64le
optional: true
- job: package-ubuntu18.04-ppc64le
optional: true
# Define publish test helpers # Define publish test helpers
.test:toolkit: .test:toolkit: