Commit fc63f744 authored by Daniel Perez's avatar Daniel Perez
Browse files

Merge branch 'slb/dperez50/update-to-use-ci' into 'master'

ci: update scripts to use npm ci instead of npm install

See merge request !135
parents af0b211d 6e02e59d
Pipeline #50206 failed with stages
in 10 minutes and 1 second
......@@ -49,8 +49,7 @@ include:
# scan
#fossa
- project: "osdu/platform/ci-cd-pipelines"
file: "scanners/fossa-node.yml"
- local: "devops/osdu/scanners/fossa-node.yml"
#lint
- local: "/devops/osdu/scanners/lint-node.yml"
......
include:
- project: "osdu/platform/ci-cd-pipelines"
file: "scanners/fossa-global.yml"
# --------------------------------------------------------------------------------
fossa-analyze:
image: $CI_REGISTRY/divido/fossa-cli-utilities/fossa-cli-utilities:v5.1
stage: scan
needs: ['compile-and-unit-test']
tags: ['osdu-medium']
only:
variables:
- $FOSSA_API_KEY
script:
# fossa-check-for-licensing-issues needs a CI_COMMIT_BRANCH defined to know how to parse the FOSSA API results
# When building tags, this isn't defined by GitLab. In that case, we use the tag name instead. If that's not defined
# then things will fail and we'll have to make this smarter
- test -z "$CI_COMMIT_BRANCH" && export CI_COMMIT_BRANCH="$CI_COMMIT_TAG"
- npm ci --production
- fossa analyze --project "${CI_PROJECT_TITLE}" --project-url "${CI_PROJECT_URL}" --branch "${CI_COMMIT_BRANCH}"
- fossa-check-for-licensing-issues
......@@ -14,8 +14,8 @@
"setup:dev": "(nohup redis-server > /tmp/redis.log 2>&1 &) && (npm i)",
"test": "env UTEST=true mocha -r ts-node/register tests/utest/test.ts",
"test-coverage": "env UTEST=true nyc mocha -r ts-node/register --reporter mocha-junit-reporter tests/utest/test.ts",
"test-automation": "npm run clean && npm install && npm run build && npm run test-coverage",
"test-lcov-automation": "npm run clean && npm install && npm run build && npm run test-lcov-coverage",
"test-automation": "npm run clean && npm ci && npm run build && npm run test-coverage",
"test-lcov-automation": "npm run clean && npm ci && npm run build && npm run test-lcov-coverage",
"test-lcov-coverage": "env UTEST=true nyc mocha -r ts-node/register -r source-map-support/register --recursive -R mocha-bamboo-reporter tests/utest/test.ts",
"test-e2e-parallel": "node ./tests/e2e/parallel/run_e2e_tests_parallel.js",
"copy-static-files": "copyfiles --error --up 1 ./docs/api/openapi.osdu.yaml ./dist/docs",
......
......@@ -27,7 +27,7 @@ RUN apt-get install -yqq --no-install-recommends openssl
ADD ./ /service
WORKDIR /service
RUN npm run clean && rm -rf node_modules && rm -rf artifact && mkdir artifact
RUN npm install
RUN npm ci
RUN npm run build
RUN cp -r package.json npm-shrinkwrap.json dist artifact
......@@ -44,5 +44,5 @@ COPY --from=runtime-builder /service/artifact /seistore-service
WORKDIR /seistore-service
COPY src/cloud/providers/aws/build-aws/ssl.sh /seistore-service/ssl.sh
COPY src/cloud/providers/aws/build-aws/entrypoint.sh /seistore-service/entrypoint.sh
RUN npm install --production
RUN npm ci --production
ENTRYPOINT ["/bin/sh", "-c", "/seistore-service/entrypoint.sh"]
\ No newline at end of file
......@@ -94,7 +94,7 @@ sed -i "s/#{TENANT}#/${working_tenant}/g" ./tests/e2e/parallel/postman_env.json
sed -i "s/#{SUBPROJECT}#/${working_subproject}/g" ./tests/e2e/parallel/postman_env.json
# install requied packages
npm install
npm ci
# run parallel tests
npm run test-e2e-parallel
......
......@@ -156,7 +156,7 @@ sed -i "s/#{VCS_PROVIDER}#/${VCS_Provider}/g" ./tests/e2e/postman_env.json
sed -i "s/#{DE_APP_KEY}#/${de_app_key}/g" ./tests/e2e/postman_env.json
# install requied packages
npm install
npm ci
# run parallel tests
./node_modules/newman/bin/newman.js run ./tests/e2e/postman_collection.json \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment