diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2024-03-21 14:51:47 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2024-03-21 15:10:00 +1000 |
commit | 2e0a0cd271228a04ed6f9078a839c1a4bc4b61fb (patch) | |
tree | adca3f6bb1649049c53a4f08bc7d457a6f545528 | |
parent | 97d0e4d1514ad5c0ddca177e7cd094465b0691f1 (diff) |
gitlab CI: update to latest template and use the ci-fairy image
Makes life easier because we don't have to deal with the pip complaints.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | .gitlab-ci.yml | 41 | ||||
-rw-r--r-- | .gitlab-ci/ci.template | 37 |
2 files changed, 32 insertions, 46 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7655f2..f7122b0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,22 +4,18 @@ # # ######################################## -.templates_sha: &template_sha c1e465762df9d4208a03ed4df6cae15006579838 # see https://docs.gitlab.com/ee/ci/yaml/#includefile +.templates_sha: &template_sha 9568e38927f9e9c48d4f586f84a071c3a4bdcd39 # see https://docs.gitlab.com/ee/ci/yaml/#includefile include: - project: 'freedesktop/ci-templates' ref: *template_sha file: - # Alpine container builder template - '/templates/alpine.yml' - # Arch container builder template - '/templates/arch.yml' - # Debian container builder template - '/templates/debian.yml' - # Fedora container builder template - '/templates/fedora.yml' - # Ubuntu container builder template - '/templates/ubuntu.yml' + - '/templates/ci-fairy.yml' stages: - prep # rebuild the container images if there is a change @@ -135,14 +131,11 @@ variables: # $SRCDIR/.gitlab-ci/generate-gitlab-ci.py # check-ci-script: - image: golang:alpine + extends: + - .fdo.ci-fairy stage: prep - before_script: - - apk add python3 py-pip git - - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates script: - - ci-fairy generate-template - - git diff --exit-code && exit 0 || true + - ci-fairy generate-template --verify && exit 0 || true - echo "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify" - exit 1 @@ -151,13 +144,13 @@ check-ci-script: # check-commit: - image: golang:alpine + extends: + - .fdo.ci-fairy stage: prep - before_script: - - apk add python3 py-pip git - - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates script: - - ci-fairy check-commits --signed-off-by --junit-xml=results.xml + - ci-fairy -vv check-commits --signed-off-by --junit-xml=results.xml && exit 0 || true + - echo "Error checking the commit message format. Please verify" + - exit 1 except: - master@libevdev/libevdev variables: @@ -171,11 +164,9 @@ check-commit: # check-merge-request: - image: golang:alpine + extends: + - .fdo.ci-fairy stage: merge-check - before_script: - - apk add python3 py-pip git - - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates script: - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml artifacts: @@ -183,6 +174,8 @@ check-merge-request: reports: junit: results.xml allow_failure: true + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' .fedora.packages: @@ -379,11 +372,9 @@ alpine:latest@container-forced-rebuild: # the registry and will remove any that are not tagged with the provided # $container_image:$tag .container-clean: + extends: + - .fdo.ci-fairy stage: container_clean - image: golang:alpine - before_script: - - apk add python3 py-pip git - - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates script: # Go to your Profile, Settings, Access Tokens # Create a personal token with 'api' scope, copy the value. diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index 30f3aed..4ee8fb3 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -6,16 +6,16 @@ # # ######################################## -.templates_sha: &template_sha c1e465762df9d4208a03ed4df6cae15006579838 # see https://docs.gitlab.com/ee/ci/yaml/#includefile +.templates_sha: &template_sha 9568e38927f9e9c48d4f586f84a071c3a4bdcd39 # see https://docs.gitlab.com/ee/ci/yaml/#includefile include: - project: 'freedesktop/ci-templates' ref: *template_sha file: {% for distribution in distributions|map(attribute='name')|unique()|sort() %} - # {{ distribution.capitalize() }} container builder template - '/templates/{{distribution}}.yml' {% endfor %} + - '/templates/ci-fairy.yml' stages: - prep # rebuild the container images if there is a change @@ -96,14 +96,11 @@ variables: # $SRCDIR/.gitlab-ci/generate-gitlab-ci.py # check-ci-script: - image: golang:alpine + extends: + - .fdo.ci-fairy stage: prep - before_script: - - apk add python3 py-pip git - - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates script: - - ci-fairy generate-template - - git diff --exit-code && exit 0 || true + - ci-fairy generate-template --verify && exit 0 || true - echo "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify" - exit 1 @@ -112,13 +109,13 @@ check-ci-script: # check-commit: - image: golang:alpine + extends: + - .fdo.ci-fairy stage: prep - before_script: - - apk add python3 py-pip git - - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates script: - - ci-fairy check-commits --signed-off-by --junit-xml=results.xml + - ci-fairy -vv check-commits --signed-off-by --junit-xml=results.xml && exit 0 || true + - echo "Error checking the commit message format. Please verify" + - exit 1 except: - master@libevdev/libevdev variables: @@ -132,11 +129,9 @@ check-commit: # check-merge-request: - image: golang:alpine + extends: + - .fdo.ci-fairy stage: merge-check - before_script: - - apk add python3 py-pip git - - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates script: - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml artifacts: @@ -144,6 +139,8 @@ check-merge-request: reports: junit: results.xml allow_failure: true + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' {% for distro in distributions %} @@ -190,11 +187,9 @@ check-merge-request: # the registry and will remove any that are not tagged with the provided # $container_image:$tag .container-clean: + extends: + - .fdo.ci-fairy stage: container_clean - image: golang:alpine - before_script: - - apk add python3 py-pip git - - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates script: # Go to your Profile, Settings, Access Tokens # Create a personal token with 'api' scope, copy the value. |