gitlab CI: use a template for the various ci-fairy jobs

And switch to python:alpine, an image that is tiny and sufficient for the job
we want.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-11-11 09:13:20 +10:00
parent ef5919cdab
commit c23af9e178
2 changed files with 30 additions and 34 deletions

View file

@ -123,6 +123,13 @@ variables:
reports:
junit: $MESON_BUILDDIR/junit-*.xml
.ci_fairy_image:
image: python:alpine
before_script:
- apk add git
- pip install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
#################################################################
# #
# prep stage #
@ -134,11 +141,9 @@ variables:
# $SRCDIR/.gitlab-ci/generate-gitlab-ci.py
#
check-ci-script:
image: golang:alpine
extends:
- .ci_fairy_image
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
@ -150,11 +155,9 @@ check-ci-script:
#
check-commit:
image: golang:alpine
extends:
- .ci_fairy_image
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
except:
@ -170,11 +173,9 @@ check-commit:
#
check-merge-request:
image: golang:alpine
extends:
- .ci_fairy_image
stage: deploy
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:
@ -322,13 +323,10 @@ freebsd:11.2@container-prep:
# $container_image:$tag
#
.container-clean:
stage: container_clean
extends:
- .policy
image: golang:alpine
before_script:
- apk add python3 py-pip git
- pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
- .ci_fairy_image
stage: container_clean
script:
# Go to your Profile, Settings, Access Tokens
# Create a personal token with 'api' scope, copy the value.

View file

@ -119,6 +119,13 @@ variables:
reports:
junit: $MESON_BUILDDIR/junit-*.xml
.ci_fairy_image:
image: python:alpine
before_script:
- apk add git
- pip install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
#################################################################
# #
# prep stage #
@ -130,11 +137,9 @@ variables:
# $SRCDIR/.gitlab-ci/generate-gitlab-ci.py
#
check-ci-script:
image: golang:alpine
extends:
- .ci_fairy_image
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
@ -146,11 +151,9 @@ check-ci-script:
#
check-commit:
image: golang:alpine
extends:
- .ci_fairy_image
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
except:
@ -166,11 +169,9 @@ check-commit:
#
check-merge-request:
image: golang:alpine
extends:
- .ci_fairy_image
stage: deploy
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:
@ -285,13 +286,10 @@ freebsd:11.2@container-prep:
# $container_image:$tag
#
.container-clean:
stage: container_clean
extends:
- .policy
image: golang:alpine
before_script:
- apk add python3 py-pip git
- pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
- .ci_fairy_image
stage: container_clean
script:
# Go to your Profile, Settings, Access Tokens
# Create a personal token with 'api' scope, copy the value.