diff options
author | Ondrej Holy <oholy@redhat.com> | 2023-01-19 09:38:55 +0100 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2023-01-24 07:04:33 +0000 |
commit | 29f4004fd38feb4b46d1bf95c1ae6fa42bccce7c (patch) | |
tree | 3c224ddf864845ff48a7d857cfed85888badce8d /.gitlab-ci.yml | |
parent | 0bc1ad5293b220cf78c8405cfecb622f43cc0cb5 (diff) | |
download | nautilus-29f4004fd38feb4b46d1bf95c1ae6fa42bccce7c.tar.gz |
ci: Replace only/except with rules
The only/except keywords were deprecated in favor of rules. Let's
replace them with rules.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 80af9ec2c..3ea610e65 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,13 +20,8 @@ flatpak@x86_64: extends: ['.flatpak@x86_64', '.vars-devel'] flatpak@aarch64: - #don't build for every, MRs to save resources - only: - refs: - - 'master' - - 'main' - - $CI_DEFAULT_BRANCH - + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH extends: ['.flatpak@aarch64', '.vars-devel'] nightly@x86_64: @@ -50,8 +45,11 @@ style check: script: - LANG=C.utf8 data/run-uncrustify.sh - git diff --exit-code | tee uncrustify.diff - except: - - /^gnome-.*$/ + rules: + # https://docs.gitlab.com/ee/ci/jobs/job_control.html#avoid-duplicate-pipelines + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + when: never + - if: $CI_COMMIT_BRANCH !~ /^gnome-.*$/ update image: variables: @@ -68,19 +66,17 @@ update image: - buildah push --creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD $CI_REGISTRY_IMAGE - buildah push --creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD "$CI_REGISTRY_IMAGE:v$CI_JOB_ID" when: manual - only: - - web - - master - except: - variables: - - $CI_PROJECT_NAMESPACE != "GNOME" + rules: + - if: $CI_PROJECT_NAMESPACE != "GNOME" + when: never + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_PIPELINE_SOURCE == "web" pages: image: registry.gitlab.gnome.org/gnome/nautilus:latest stage: deploy - only: - variables: - - $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH script: - meson setup -Ddocs=true -Dextensions=false -Dtests=none _build - ninja -C _build |