From 1737e686c8346c01892631c8b5993237fdf7561b Mon Sep 17 00:00:00 2001 From: Domenico Giordano <domenico.giordano@cern.ch> Date: Sun, 5 Jul 2020 15:15:25 +0200 Subject: [PATCH] try to speedup build. Kaniko very long --- cms/cms-patatrack-ci.yml | 44 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/cms/cms-patatrack-ci.yml b/cms/cms-patatrack-ci.yml index 90d917f..b3afc25 100644 --- a/cms/cms-patatrack-ci.yml +++ b/cms/cms-patatrack-ci.yml @@ -12,28 +12,28 @@ stages: ########################## ## Templates ############# -.definition_build_image_kaniko: &template_build_image_kaniko - tags: - - hep-workload-gpu-docker-builder - image: # NB enable shared runners and do not specify a CI tag - name: gitlab-registry.cern.ch/ci-tools/docker-image-builder # CERN version of the Kaniko image - entrypoint: [""] - script: - - echo "current commit is ${CI_COMMIT_SHA:0:8}" - - echo "current branch is ${CI_COMMIT_BRANCH}" - - echo "current tag is ${CI_COMMIT_TAG}" - - if [[ -z $DOCKERFILE ]]; then echo "ERROR variable DOCKERFILE is not defined "; exit 1; fi - - if [[ -z $CONTEXT ]]; then echo "ERROR variable CONTEXT is not defined "; exit 1; fi - - if [[ -z $IMAGE_NAME ]]; then echo "ERROR variable IMAGE_NAME is not defined "; exit 1; fi - - if [[ -z $IMAGE_TAG ]]; then echo "ERROR variable IMAGE_TAG is not defined "; exit 1; fi - - export DESTINATIONS="--destination $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG --destination $CI_REGISTRY_IMAGE/$IMAGE_NAME:ci-${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}" - - echo "DESTINATIONS $DESTINATIONS" - # Prepare Kaniko configuration file - - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - # Build and push the image from the Dockerfile at the root of the project. - # To push to a specific docker tag, amend the --destination parameter, e.g. --destination $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME - # See https://docs.gitlab.com/ee/ci/variables/predefined_variables.html#variables-reference for available variables - - /kaniko/executor --context $CONTEXT --dockerfile $DOCKERFILE $DESTINATIONS +# .definition_build_image_kaniko: &template_build_image_kaniko +# tags: +# - hep-workload-gpu-docker-builder +# image: # NB enable shared runners and do not specify a CI tag +# name: gitlab-registry.cern.ch/ci-tools/docker-image-builder # CERN version of the Kaniko image +# entrypoint: [""] +# script: +# - echo "current commit is ${CI_COMMIT_SHA:0:8}" +# - echo "current branch is ${CI_COMMIT_BRANCH}" +# - echo "current tag is ${CI_COMMIT_TAG}" +# - if [[ -z $DOCKERFILE ]]; then echo "ERROR variable DOCKERFILE is not defined "; exit 1; fi +# - if [[ -z $CONTEXT ]]; then echo "ERROR variable CONTEXT is not defined "; exit 1; fi +# - if [[ -z $IMAGE_NAME ]]; then echo "ERROR variable IMAGE_NAME is not defined "; exit 1; fi +# - if [[ -z $IMAGE_TAG ]]; then echo "ERROR variable IMAGE_TAG is not defined "; exit 1; fi +# - export DESTINATIONS="--destination $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG --destination $CI_REGISTRY_IMAGE/$IMAGE_NAME:ci-${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}" +# - echo "DESTINATIONS $DESTINATIONS" +# # Prepare Kaniko configuration file +# - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json +# # Build and push the image from the Dockerfile at the root of the project. +# # To push to a specific docker tag, amend the --destination parameter, e.g. --destination $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME +# # See https://docs.gitlab.com/ee/ci/variables/predefined_variables.html#variables-reference for available variables +# - /kaniko/executor --context $CONTEXT --dockerfile $DOCKERFILE $DESTINATIONS .definition_build_image: &template_build_image tags: -- GitLab