mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-20 15:00:06 +01:00
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>
This commit is contained in:
parent
97d0e4d151
commit
2e0a0cd271
2 changed files with 32 additions and 46 deletions
|
|
@ -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:
|
include:
|
||||||
- project: 'freedesktop/ci-templates'
|
- project: 'freedesktop/ci-templates'
|
||||||
ref: *template_sha
|
ref: *template_sha
|
||||||
file:
|
file:
|
||||||
# Alpine container builder template
|
|
||||||
- '/templates/alpine.yml'
|
- '/templates/alpine.yml'
|
||||||
# Arch container builder template
|
|
||||||
- '/templates/arch.yml'
|
- '/templates/arch.yml'
|
||||||
# Debian container builder template
|
|
||||||
- '/templates/debian.yml'
|
- '/templates/debian.yml'
|
||||||
# Fedora container builder template
|
|
||||||
- '/templates/fedora.yml'
|
- '/templates/fedora.yml'
|
||||||
# Ubuntu container builder template
|
|
||||||
- '/templates/ubuntu.yml'
|
- '/templates/ubuntu.yml'
|
||||||
|
- '/templates/ci-fairy.yml'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- prep # rebuild the container images if there is a change
|
- prep # rebuild the container images if there is a change
|
||||||
|
|
@ -135,14 +131,11 @@ variables:
|
||||||
# $SRCDIR/.gitlab-ci/generate-gitlab-ci.py
|
# $SRCDIR/.gitlab-ci/generate-gitlab-ci.py
|
||||||
#
|
#
|
||||||
check-ci-script:
|
check-ci-script:
|
||||||
image: golang:alpine
|
extends:
|
||||||
|
- .fdo.ci-fairy
|
||||||
stage: prep
|
stage: prep
|
||||||
before_script:
|
|
||||||
- apk add python3 py-pip git
|
|
||||||
- pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
|
|
||||||
script:
|
script:
|
||||||
- ci-fairy generate-template
|
- ci-fairy generate-template --verify && exit 0 || true
|
||||||
- git diff --exit-code && exit 0 || true
|
|
||||||
- echo "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify"
|
- echo "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify"
|
||||||
- exit 1
|
- exit 1
|
||||||
|
|
||||||
|
|
@ -151,13 +144,13 @@ check-ci-script:
|
||||||
#
|
#
|
||||||
|
|
||||||
check-commit:
|
check-commit:
|
||||||
image: golang:alpine
|
extends:
|
||||||
|
- .fdo.ci-fairy
|
||||||
stage: prep
|
stage: prep
|
||||||
before_script:
|
|
||||||
- apk add python3 py-pip git
|
|
||||||
- pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
|
|
||||||
script:
|
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:
|
except:
|
||||||
- master@libevdev/libevdev
|
- master@libevdev/libevdev
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -171,11 +164,9 @@ check-commit:
|
||||||
#
|
#
|
||||||
|
|
||||||
check-merge-request:
|
check-merge-request:
|
||||||
image: golang:alpine
|
extends:
|
||||||
|
- .fdo.ci-fairy
|
||||||
stage: merge-check
|
stage: merge-check
|
||||||
before_script:
|
|
||||||
- apk add python3 py-pip git
|
|
||||||
- pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
|
|
||||||
script:
|
script:
|
||||||
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
|
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
@ -183,6 +174,8 @@ check-merge-request:
|
||||||
reports:
|
reports:
|
||||||
junit: results.xml
|
junit: results.xml
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||||
|
|
||||||
|
|
||||||
.fedora.packages:
|
.fedora.packages:
|
||||||
|
|
@ -379,11 +372,9 @@ alpine:latest@container-forced-rebuild:
|
||||||
# the registry and will remove any that are not tagged with the provided
|
# the registry and will remove any that are not tagged with the provided
|
||||||
# $container_image:$tag
|
# $container_image:$tag
|
||||||
.container-clean:
|
.container-clean:
|
||||||
|
extends:
|
||||||
|
- .fdo.ci-fairy
|
||||||
stage: container_clean
|
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:
|
script:
|
||||||
# Go to your Profile, Settings, Access Tokens
|
# Go to your Profile, Settings, Access Tokens
|
||||||
# Create a personal token with 'api' scope, copy the value.
|
# Create a personal token with 'api' scope, copy the value.
|
||||||
|
|
|
||||||
|
|
@ -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:
|
include:
|
||||||
- project: 'freedesktop/ci-templates'
|
- project: 'freedesktop/ci-templates'
|
||||||
ref: *template_sha
|
ref: *template_sha
|
||||||
file:
|
file:
|
||||||
{% for distribution in distributions|map(attribute='name')|unique()|sort() %}
|
{% for distribution in distributions|map(attribute='name')|unique()|sort() %}
|
||||||
# {{ distribution.capitalize() }} container builder template
|
|
||||||
- '/templates/{{distribution}}.yml'
|
- '/templates/{{distribution}}.yml'
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
- '/templates/ci-fairy.yml'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- prep # rebuild the container images if there is a change
|
- prep # rebuild the container images if there is a change
|
||||||
|
|
@ -96,14 +96,11 @@ variables:
|
||||||
# $SRCDIR/.gitlab-ci/generate-gitlab-ci.py
|
# $SRCDIR/.gitlab-ci/generate-gitlab-ci.py
|
||||||
#
|
#
|
||||||
check-ci-script:
|
check-ci-script:
|
||||||
image: golang:alpine
|
extends:
|
||||||
|
- .fdo.ci-fairy
|
||||||
stage: prep
|
stage: prep
|
||||||
before_script:
|
|
||||||
- apk add python3 py-pip git
|
|
||||||
- pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
|
|
||||||
script:
|
script:
|
||||||
- ci-fairy generate-template
|
- ci-fairy generate-template --verify && exit 0 || true
|
||||||
- git diff --exit-code && exit 0 || true
|
|
||||||
- echo "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify"
|
- echo "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify"
|
||||||
- exit 1
|
- exit 1
|
||||||
|
|
||||||
|
|
@ -112,13 +109,13 @@ check-ci-script:
|
||||||
#
|
#
|
||||||
|
|
||||||
check-commit:
|
check-commit:
|
||||||
image: golang:alpine
|
extends:
|
||||||
|
- .fdo.ci-fairy
|
||||||
stage: prep
|
stage: prep
|
||||||
before_script:
|
|
||||||
- apk add python3 py-pip git
|
|
||||||
- pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
|
|
||||||
script:
|
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:
|
except:
|
||||||
- master@libevdev/libevdev
|
- master@libevdev/libevdev
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -132,11 +129,9 @@ check-commit:
|
||||||
#
|
#
|
||||||
|
|
||||||
check-merge-request:
|
check-merge-request:
|
||||||
image: golang:alpine
|
extends:
|
||||||
|
- .fdo.ci-fairy
|
||||||
stage: merge-check
|
stage: merge-check
|
||||||
before_script:
|
|
||||||
- apk add python3 py-pip git
|
|
||||||
- pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
|
|
||||||
script:
|
script:
|
||||||
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
|
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
@ -144,6 +139,8 @@ check-merge-request:
|
||||||
reports:
|
reports:
|
||||||
junit: results.xml
|
junit: results.xml
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||||
|
|
||||||
|
|
||||||
{% for distro in distributions %}
|
{% for distro in distributions %}
|
||||||
|
|
@ -190,11 +187,9 @@ check-merge-request:
|
||||||
# the registry and will remove any that are not tagged with the provided
|
# the registry and will remove any that are not tagged with the provided
|
||||||
# $container_image:$tag
|
# $container_image:$tag
|
||||||
.container-clean:
|
.container-clean:
|
||||||
|
extends:
|
||||||
|
- .fdo.ci-fairy
|
||||||
stage: container_clean
|
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:
|
script:
|
||||||
# Go to your Profile, Settings, Access Tokens
|
# Go to your Profile, Settings, Access Tokens
|
||||||
# Create a personal token with 'api' scope, copy the value.
|
# Create a personal token with 'api' scope, copy the value.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue