xf86-video-amdgpu: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Dec 20 09:36:40 UTC 2018
.gitlab-ci.yml | 32 +++++++++++++++++++++++---------
1 file changed, 23 insertions(+), 9 deletions(-)
New commits:
commit f3ddda618ec86650ed85f8b140a5db1394676748
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Mon Dec 17 17:54:05 2018 +0100
gitlab-ci: Use kaniko instead of docker-in-docker for image generation
kaniko can also work in unprivileged runners.
Based on v2 of
https://gitlab.freedesktop.org/xorg/xserver/merge_requests/92 .
Acked-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d1960fb..4f63840 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,16 +24,30 @@ stages:
debian-testing:
stage: docker-image
- image: docker:stable
- services:
- - docker:dind
- before_script:
- - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
+ image:
+ name: gcr.io/kaniko-project/executor:debug
+ entrypoint: [""]
script:
- - docker pull "$IMAGE_LOCAL" ||
- ((docker pull "$IMAGE_MAIN" && docker tag "$IMAGE_MAIN" "$IMAGE_LOCAL") ||
- docker build -t "$IMAGE_LOCAL" .gitlab-ci;
- docker push "$IMAGE_LOCAL")
+ - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
+ - mkdir kaniko-context
+ - |
+ echo "FROM $IMAGE_LOCAL" > kaniko-context/Dockerfile
+ # If the image exists in the local registry, skip to the build-and-test job
+ set +e
+ set -x
+ /kaniko/executor --context kaniko-context --no-push && exit 0
+ set +x
+ set -e
+ - |
+ echo "FROM $IMAGE_MAIN" > kaniko-context/Dockerfile
+ # Try to re-use the image from the main repository's registry, and if
+ # that fails, generate a local image from scratch
+ set +e
+ set -x
+ /kaniko/executor --context kaniko-context --destination $IMAGE_LOCAL && exit 0
+ set +x
+ set -e
+ - /kaniko/executor --context $CI_PROJECT_DIR/.gitlab-ci --destination $IMAGE_LOCAL
image: $IMAGE_LOCAL
More information about the xorg-commit
mailing list