From 4cebd675427caa7846eec488c0e71d7418855be8 Mon Sep 17 00:00:00 2001 From: andresanaya21 <alvaroandres.anayaamariles@telefonica.com> Date: Mon, 13 Jan 2025 16:01:05 +0100 Subject: [PATCH] refactor: update docker login command to use password-stdin for security --- capif/templates/ci_staging.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capif/templates/ci_staging.gitlab-ci.yml b/capif/templates/ci_staging.gitlab-ci.yml index 48af42f..b34f0b0 100644 --- a/capif/templates/ci_staging.gitlab-ci.yml +++ b/capif/templates/ci_staging.gitlab-ci.yml @@ -245,7 +245,7 @@ staging_build_and_push: - export TMP_PWD=$PWD - echo "TMP_PWD=$TMP_PWD" - echo "### docker login###" - - docker login --username $CI_REGISTRY_USER --password $CI_JOB_TOKEN $CI_REGISTRY + - echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY --username $CI_REGISTRY_USER --password-stdin - echo "----------------------------------------------------" - echo "### build and push nginx image###" - cd $TMP_PWD/services/nginx/ -- GitLab