devops: updated script to copy npmrc to the root directory instead of the current directory if it's empty.

This commit is contained in:
Rebecca Valente 2025-07-08 01:28:14 -03:00
parent 759c960d55
commit 0dbc6286c2

View File

@ -8,7 +8,7 @@ stages:
default:
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- if ! test -z "$NPMRC"; then cd ${DOCKERFILE_DIRECTORY}; cp "$NPMRC" ./.npmrc; fi
- if ! test -z "$NPMRC"; then echo "NPMRC is in $NPMRC";cp "$NPMRC" /root/.npmrc; fi
build-and-push docker image to local registry:
stage: build