diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2020-03-18 08:10:30 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-03-18 12:43:48 +1000 |
commit | 325839e6401d322ed632bf30e2e0255785bb31f6 (patch) | |
tree | a087213d1d67173f6d1be8986aff59626e5f234e /.gitlab-ci.yml | |
parent | 9ffed2f2f4fc15c641e904787f4d995985cfef9f (diff) | |
download | libevdev-325839e6401d322ed632bf30e2e0255785bb31f6.tar.gz |
gitlab CI: move to use ci-fairy
ci-templates now has a new tool ci-fairy that replaces our jinja generation
script with something (eventually) unified across project repositories. Let's
move the files to the expected locations .gitlab-ci/config.yml and
.gitlab-ci/ci.template.
ci-fairy also has a wrapper to delete images, let's start using that.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 51ba1ab..5d3d5be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ # # ######################################## -.templates_sha: &template_sha d32ac1f30faad4fdef24af8a7724fb8c084c3dda # see https://docs.gitlab.com/ee/ci/yaml/#includefile +.templates_sha: &template_sha ca99d9418390fb5faaa7f2407b94c733d7ec6a37 # see https://docs.gitlab.com/ee/ci/yaml/#includefile include: # Alpine container builder template @@ -153,9 +153,9 @@ check-ci-script: stage: prep before_script: - apk add python3 git - - pip3 install --user jinja2 PyYAML + - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates script: - - python3 ./.gitlab-ci/generate-gitlab-ci.py + - ci-fairy generate-template - git diff --exit-code && exit 0 || true - echo "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify" - exit 1 @@ -480,18 +480,17 @@ alpine:latest@container-forced-rebuild: stage: container_clean image: golang:alpine before_script: - - apk add python3 - - pip3 install --user python-gitlab + - apk add python3 git + - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates script: - - LATEST_TAG=$(echo $DISTRO_CONTAINER_IMAGE | cut -f2 -d:) # Go to your Profile, Settings, Access Tokens # Create a personal token with 'api' scope, copy the value. # Go to Settings, CI/CD, Variables # Define a variable of type File named AUTHFILE. Content is that token # value. - - python3 .gitlab-ci/gitlab-container-delete $CI_SERVER_URL $CI_PROJECT_PATH + - ci-fairy -v --authfile $AUTHFILE delete-image --repository $FDO_DISTRIBUTION_NAME/$FDO_DISTRIBUTION_VERSION - --authfile $AUTHFILE --exclude-tag "$LATEST_TAG" + --exclude-tag $FDO_DISTRIBUTION_TAG dependencies: [] allow_failure: true only: |