diff --git a/.common-ci.yml b/.common-ci.yml index e9bd5a5c..0891f67e 100644 --- a/.common-ci.yml +++ b/.common-ci.yml @@ -34,12 +34,22 @@ stages: - scan - release +.main-or-manual: + rules: + - if: $CI_COMMIT_BRANCH == "main" + - if: $CI_PIPELINE_SOURCE == "schedule" + when: manual + # Define the distribution targets .dist-amazonlinux2: + rules: + - !reference [.main-or-manual, rules] variables: DIST: amazonlinux2 .dist-centos7: + rules: + - !reference [.main-or-manual, rules] variables: DIST: centos7 CVE_UPDATES: "cyrus-sasl-lib" @@ -50,27 +60,39 @@ stages: CVE_UPDATES: "cyrus-sasl-lib" .dist-debian10: + rules: + - !reference [.main-or-manual, rules] variables: DIST: debian10 .dist-debian9: + rules: + - !reference [.main-or-manual, rules] variables: DIST: debian9 .dist-fedora35: + rules: + - !reference [.main-or-manual, rules] variables: DIST: fedora35 .dist-opensuse-leap15.1: + rules: + - !reference [.main-or-manual, rules] variables: DIST: opensuse-leap15.1 .dist-ubi8: + rules: + - !reference [.main-or-manual, rules] variables: DIST: ubi8 CVE_UPDATES: "cyrus-sasl-lib" .dist-ubuntu16.04: + rules: + - !reference [.main-or-manual, rules] variables: DIST: ubuntu16.04 @@ -80,6 +102,8 @@ stages: CVE_UPDATES: "libsasl2-2 libsasl2-modules-db" .dist-ubuntu20.04: + rules: + - !reference [.main-or-manual, rules] variables: DIST: ubuntu20.04 CVE_UPDATES: "libsasl2-2 libsasl2-modules-db" @@ -102,6 +126,8 @@ stages: ARCH: arm64 .arch-ppc64le: + rules: + - !reference [.main-or-manual, rules] variables: ARCH: ppc64le @@ -236,10 +262,7 @@ release:staging-ubuntu20.04: - .release:staging - .dist-ubuntu20.04 needs: - - test-toolkit-ubuntu20.04 - - test-containerd-ubuntu20.04 - - test-crio-ubuntu20.04 - - test-docker-ubuntu20.04 + - image-ubuntu20.04 release:staging-packaging: extends: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 177d5006..3b028ed6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -262,7 +262,8 @@ image-ubuntu18.04: needs: - package-ubuntu18.04-amd64 - package-ubuntu18.04-arm64 - - package-ubuntu18.04-ppc64le + - job: package-ubuntu18.04-ppc64le + optional: true image-ubuntu20.04: extends: @@ -281,23 +282,36 @@ image-packaging: - .package-artifacts - .dist-packaging needs: - - package-amazonlinux2-aarch64 - - package-amazonlinux2-x86_64 - - package-centos7-ppc64le - - package-centos7-x86_64 - - package-centos8-aarch64 - - package-centos8-ppc64le - - package-centos8-x86_64 - - package-debian10-amd64 - - package-debian9-amd64 - - package-fedora35-aarch64 - - package-fedora35-x86_64 - - package-opensuse-leap15.1-x86_64 - - package-ubuntu16.04-amd64 - - package-ubuntu16.04-ppc64le - - package-ubuntu18.04-amd64 - - package-ubuntu18.04-arm64 - - package-ubuntu18.04-ppc64le + - job: package-centos8-aarch64 + - job: package-centos8-x86_64 + - job: package-ubuntu18.04-amd64 + - job: package-ubuntu18.04-arm64 + - job: package-amazonlinux2-aarch64 + optional: true + - job: package-amazonlinux2-x86_64 + optional: true + - job: package-centos7-ppc64le + optional: true + - job: package-centos7-x86_64 + optional: true + - job: package-centos8-ppc64le + optional: true + - job: package-debian10-amd64 + optional: true + - 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 .test:toolkit: @@ -357,31 +371,3 @@ test-docker-ubuntu18.04: needs: - image-ubuntu18.04 -test-toolkit-ubuntu20.04: - extends: - - .test:toolkit - - .dist-ubuntu20.04 - needs: - - image-ubuntu20.04 - -test-containerd-ubuntu20.04: - extends: - - .test:containerd - - .dist-ubuntu20.04 - needs: - - image-ubuntu20.04 - -test-crio-ubuntu20.04: - extends: - - .test:crio - - .dist-ubuntu20.04 - needs: - - image-ubuntu20.04 - -test-docker-ubuntu20.04: - extends: - - .test:docker - - .dist-ubuntu20.04 - needs: - - image-ubuntu20.04 -