Commit a7da8571 authored by Christophe Benz's avatar Christophe Benz

Use kaniko to build Docker image

parent b3f1d163
......@@ -2,19 +2,12 @@ Build Docker image:
stage: deploy
only:
- tags
image: docker:stable
services:
- docker:18.09-dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
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 build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
tags:
- docker-privileged
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile.ci --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
Publish on PyPI:
stage: deploy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment