Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 6d3a14a9 rédigé par Erwan BOUSSE's avatar Erwan BOUSSE
Parcourir les fichiers

Switch to kaniko for building docker image

parent ff035887
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #75111 réussi
image: docker:stable
cache:
key: "$CI_BUILD_REF_NAME"
stages:
- build
- test
services:
- docker:dind
before_script:
- echo $CI_JOB_TOKEN | docker login --username gitlab-ci-token --password-stdin $CI_REGISTRY
build:
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint: [""]
stage: build
script:
- docker pull $CI_REGISTRY_IMAGE || true
- docker build --pull --cache-from $CI_REGISTRY_IMAGE --tag $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID --tag $CI_REGISTRY_IMAGE:latest --build-arg http_proxy=${http_proxy} --build-arg https_proxy=${http_proxy} .
- docker push $CI_REGISTRY_IMAGE
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--build-arg http_proxy=$http_proxy
--build-arg https_proxy=$https_proxy
--build-arg no_proxy=$no_proxy
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}"
test:
stage: test
image: $CI_REGISTRY_IMAGE
before_script: []
image: $CI_REGISTRY_IMAGE:${CI_PIPELINE_IID}
script:
- drawio --version
- drawio --version
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter