From: Michael Hofmann <mhofmann@xxxxxxxxxx> Simplify job rules - enable head pipelines in workflow rules - always run docs/pages jobs on os-build head pipelines - always run test_docs job on os-build MR pipelines Signed-off-by: Michael Hofmann <mhofmann@xxxxxxxxxx> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index blahblah..blahblah 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,13 +20,24 @@ default: workflow: rules: - - if: '$CI_PIPELINE_SOURCE == "schedule"' # ARK release pipelines - - if: '$CI_MERGE_REQUEST_PROJECT_PATH =~ /^cki-project.kernel-ark/' # ARK MR CI + # ARK release pipelines + - if: '$CI_PIPELINE_SOURCE == "schedule"' + # HEAD pipelines + - if: $CI_PIPELINE_SOURCE =~ /push|web/ && + $CI_PROJECT_PATH =~ /^cki-project.kernel-ark/ + # merge requests + - if: $CI_MERGE_REQUEST_PROJECT_PATH =~ /^cki-project.kernel-ark/ .rules: - only-os-build: &only-os-build + only-os-build-mr: &only-os-build-mr if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != "os-build" when: never + only-os-build-head: &only-os-build-head + if: $CI_COMMIT_BRANCH != "os-build" || $CI_PIPELINE_SOURCE !~ /push|web/ + when: never + only-os-build-schedule: &only-os-build-schedule + if: $CI_COMMIT_BRANCH != "os-build" || $CI_PIPELINE_SOURCE != "schedule" + when: never on-success: &on-success when: on_success manual-for-bot: &manual-for-bot @@ -72,13 +83,13 @@ workflow: .srpm_for_bot: rules: - - *only-os-build + - *only-os-build-mr - *srpm-for-bot - *on-success .manual_for_bot: rules: - - *only-os-build + - *only-os-build-mr - *manual-for-bot - *on-success @@ -173,9 +184,9 @@ merge_upstream: - make dist-merge-upstream-push || exit 1 retry: 2 rules: - - if: '$CI_PIPELINE_SOURCE == "schedule" && $RAWHIDE_RELEASE == "false"' + - *only-os-build-schedule + - if: $RAWHIDE_RELEASE == "false" -# scheduled job rawhide_release: extends: .scheduled_setup script: @@ -195,7 +206,8 @@ rawhide_release: - git push -f gitlab ark-infra retry: 2 rules: - - if: '$CI_PIPELINE_SOURCE == "schedule" && $RAWHIDE_RELEASE == "true"' + - *only-os-build-schedule + - if: $RAWHIDE_RELEASE == "true" test_makefile: image: quay.io/fedora/fedora:rawhide @@ -216,7 +228,8 @@ test_makefile: - export missingafter=$(make dist-get-buildreqs | grep "Missing dependencies:" | cut -d":" -f2) - if [ "$missingafter" != "" ]; then echo "Missing dependencies should be null but are $missingafter. Review test log." && exit 1; fi; rules: - - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "os-build"' + - *only-os-build-mr + - *on-success test_docs: stage: test @@ -228,10 +241,8 @@ test_docs: - cd redhat/docs/ script: make SPHINXOPTS="-W" html rules: - - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "os-build"' - changes: - - redhat/docs/**/* - + - *only-os-build-mr + - *on-success docs: stage: build @@ -246,9 +257,8 @@ docs: paths: - redhat/docs/_build/html/ rules: - - if: '$CI_COMMIT_BRANCH == "os-build"' - changes: - - redhat/docs/**/* + - *only-os-build-head + - *on-success pages: stage: deploy @@ -261,6 +271,5 @@ pages: paths: - public rules: - - if: '$CI_COMMIT_BRANCH == "os-build"' - changes: - - redhat/docs/**/* + - *only-os-build-head + - *on-success -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2575 _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue