From b0c5993f93b26ce119f10052df29bc96f4ba0b28 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Sat, 6 May 2023 08:20:56 -0400 Subject: [PATCH] Swap some more only to rules --- .gitlab/Windows-CI.yml | 2 +- .gitlab/coverity.yml | 7 ++----- .gitlab/doxygen.yml | 7 ++----- .gitlab/linux-metadata-validate.yml | 21 ++++++++------------- .gitlab/mr_formatting.yml | 4 ++-- 5 files changed, 15 insertions(+), 26 deletions(-) diff --git a/.gitlab/Windows-CI.yml b/.gitlab/Windows-CI.yml index 668d708c22..8acead2f1b 100644 --- a/.gitlab/Windows-CI.yml +++ b/.gitlab/Windows-CI.yml @@ -15,9 +15,9 @@ win64_build: - build\windows\vcpkg_installed - .vcpkgCache rules: - - if: $CI_PROJECT_ROOT_NAMESPACE == "kicad" && $CI_COMMIT_REF_PROTECTED == "true" - if: $CI_PIPELINE_SOURCE == "schedule" when: never + - if: $CI_PROJECT_ROOT_NAMESPACE == "kicad" && $CI_COMMIT_REF_PROTECTED == "true" script: - C:\builder\build.ps1 -Env -Arch x64 - $vcpkgCache=Join-Path -Path (Get-Location) -ChildPath ".vcpkgCache";$env:VCPKG_DEFAULT_BINARY_CACHE=$vcpkgCache;New-Item -ItemType Directory -Force -Path $vcpkgCache diff --git a/.gitlab/coverity.yml b/.gitlab/coverity.yml index eb2e898c30..5dcab240b7 100644 --- a/.gitlab/coverity.yml +++ b/.gitlab/coverity.yml @@ -40,11 +40,8 @@ Coverity: - coverity stage: build image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:37 - only: - refs: - - schedules - variables: - - $SCHEDULED_JOB_NAME == "coverity" + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_JOB_NAME == "coverity" cache: key: coverity paths: diff --git a/.gitlab/doxygen.yml b/.gitlab/doxygen.yml index f8bf30e218..a1229768d1 100644 --- a/.gitlab/doxygen.yml +++ b/.gitlab/doxygen.yml @@ -3,6 +3,8 @@ build_doxygen_docker: services: - docker:dind stage: build + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_JOB_NAME == "doxygen" tags: - docker before_script: @@ -11,8 +13,3 @@ build_doxygen_docker: script: - docker build -t "${CI_REGISTRY_IMAGE}/doxygen:$CI_COMMIT_BRANCH" -f ./doxygen/doxygen.Dockerfile . - docker push "${CI_REGISTRY_IMAGE}/doxygen:$CI_COMMIT_BRANCH" - only: - refs: - - schedules - variables: - - $SCHEDULED_JOB_NAME == "doxygen" diff --git a/.gitlab/linux-metadata-validate.yml b/.gitlab/linux-metadata-validate.yml index bc524e8c63..0710f9072a 100644 --- a/.gitlab/linux-metadata-validate.yml +++ b/.gitlab/linux-metadata-validate.yml @@ -10,19 +10,14 @@ validate_linux_metadata: # Due to bug https://github.com/hughsie/appstream-glib/issues/381, this doesn't think our description tag # is localized even though it actually is. allow_failure: true - only: - refs: - - master - - branches - - merge_requests - - pushes - changes: - # Only run if the resources, its tests, or the translations are updated - - resources/linux/**/* - - qa/resources/linux/**/* - - translation/**/* - except: - - schedules + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + when: never + - if: $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event" + changes: + - resources/linux/**/* + - qa/resources/linux/**/* + - translation/**/* # Only build the metadata files in this CI job script: - mkdir -p build/linux diff --git a/.gitlab/mr_formatting.yml b/.gitlab/mr_formatting.yml index 666a623571..873a692608 100644 --- a/.gitlab/mr_formatting.yml +++ b/.gitlab/mr_formatting.yml @@ -7,8 +7,8 @@ test_formatting: stage: test needs: [] - only: - - merge_requests + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" allow_failure: true before_script: # We must manually add the KiCad remote to ensure it is named sensibly