Skip to content
Snippets Groups Projects
Commit ebac69db authored by Eskudero Gurrutxaga, Ibon's avatar Eskudero Gurrutxaga, Ibon
Browse files

clear cat .npmrc file content & use cache instead of artifacts

parent 1bea5536
Branches test
No related tags found
No related merge requests found
...@@ -7,18 +7,18 @@ before_script: ...@@ -7,18 +7,18 @@ before_script:
# check if js-green-licenses.json exist on PACKAGE_DIR. If not, inform user and continue # check if js-green-licenses.json exist on PACKAGE_DIR. If not, inform user and continue
- test -f $PACKAGE_DIR/js-green-licenses.json || (echo "js-green-licenses.json not found in $PACKAGE_DIR" && echo "Continuing with default configuration") - test -f $PACKAGE_DIR/js-green-licenses.json || (echo "js-green-licenses.json not found in $PACKAGE_DIR" && echo "Continuing with default configuration")
cache:
key: "$CI_COMMIT_REF_SLUG-npm-config"
paths:
- $PACKAGE_DIR/node_modules
- $PACKAGE_DIR/package-lock.json
license_check: license_check:
stage: license-check stage: license-check
tags: tags:
- docker - docker
image: $ACR_URL/node:18.12.0 image: $ACR_URL/node:18.12.0
# cache build for the next jobs # cache build for the next jobs
artifacts:
untracked: true
expire_in: 1h
paths:
- $PACKAGE_DIR/node_modules
- $PACKAGE_DIR/package-lock.json
script: script:
# Change to the directory containing package.json # Change to the directory containing package.json
- cd $PACKAGE_DIR - cd $PACKAGE_DIR
...@@ -26,7 +26,6 @@ license_check: ...@@ -26,7 +26,6 @@ license_check:
- touch ".npmrc" - touch ".npmrc"
# write config json to config file # write config json to config file
- echo "$NPMRCV2" >> .npmrc - echo "$NPMRCV2" >> .npmrc
- cat .npmrc
# install dependencies using local .npmrc # install dependencies using local .npmrc
- npm install --userconfig ./.npmrc - npm install --userconfig ./.npmrc
# check for licenses # check for licenses
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment