From d9fc5d7a8baae7d0701d958880a74f5ca1b25ff5 Mon Sep 17 00:00:00 2001 From: George Sedov <george.sedov@desy.de> Date: Fri, 14 Jan 2022 17:40:57 +0100 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb6a9fe01..b07558deb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,15 +12,12 @@ docker-build: # Use the official docker image. - image: docker:latest + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] stage: build - services: - - docker:dind - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - # Default branch leaves tag empty (= latest tag) - # All other branches are tagged with the escaped branch name (commit ref slug) script: + - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - | if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then tag="" @@ -29,9 +26,7 @@ docker-build: tag=":$CI_COMMIT_REF_SLUG" echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" fi - - cd $CI_PROJECT_DIR/deploy/build_env/manylinux2010 - - docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" . - - docker push "$CI_REGISTRY_IMAGE${tag}" + - /kaniko/executor --cache=false --context $CI_PROJECT_DIR/deploy/build_env/manylinux2010 --dockerfile $CI_PROJECT_DIR/deploy/build_env/manylinux2010/Dockerfile --destination $CI_REGISTRY_IMAGE${tag} # Run this job in a branch where a Dockerfile exists rules: - if: $CI_COMMIT_BRANCH -- GitLab