From 5310261c4f493a1fe2966a29a4d9e4b0391128d0 Mon Sep 17 00:00:00 2001 From: ibon eskudero <ibon.eskudero@tecnalia.com> Date: Thu, 5 Dec 2024 11:12:26 +0100 Subject: [PATCH] add NPMRC to docker image as arg --- project-maven-azure-docker/buildV2.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 project-maven-azure-docker/buildV2.yml diff --git a/project-maven-azure-docker/buildV2.yml b/project-maven-azure-docker/buildV2.yml new file mode 100644 index 0000000..9c74b3d --- /dev/null +++ b/project-maven-azure-docker/buildV2.yml @@ -0,0 +1,15 @@ +build: + image: $ACR_URL/docker:dind + stage: build + services: + - docker:dind + + tags: + - docker + script: + - docker login -u $ACR_USERNAME -p $ACR_PASSWORD $ACR_URL + - docker image build --build-arg REG=https://artifact.tecnalia.com/artifactory/api/npm/digicon-npm-dev/ --build-arg NPM_TKN=$NPM_TOKEN --build-arg US=$ACR_USERNAME --build-arg NPMRC=$NPMRC --build-arg CI_TOKEN=$ACR_PASSWORD -t $CONTAINER_IMAGE ./ + - docker push $CONTAINER_IMAGE + only: + - master + - main -- GitLab