Skip to content

Commit

Permalink
Merge pull request #91 from UKHomeOffice/improvement/npm-audit-in-ci
Browse files Browse the repository at this point in the history
Add npm audit to ci pipeline
  • Loading branch information
joefitter committed Aug 1, 2018
2 parents d2ecc5d + a0f2017 commit f96d025
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 12 additions & 1 deletion .drone.yml
Expand Up @@ -5,11 +5,22 @@ pipeline:
secrets:
- npm_auth_token
commands:
- npm install
- npm install -g npm@6
- npm ci
- npm test
when:
event: [push, pull_request, tag]

audit:
image: node:8
secrets:
- npm_auth_token
commands:
- npm install -g npm@6
- npx @lennym/ciaudit
when:
event: [push, pull_request, tag]

compile:
image: node:8
secrets:
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Expand Up @@ -3,10 +3,12 @@ FROM quay.io/ukhomeofficedigital/nodejs-base:v8
ARG NPM_AUTH_USERNAME
ARG NPM_AUTH_TOKEN

RUN npm install -g npm@6

COPY .npmrc /app/.npmrc
COPY package.json /app/package.json
COPY package-lock.json /app/package-lock.json
RUN npm install --production --no-optional
RUN npm ci --production --no-optional
COPY . /app

RUN rm /app/.npmrc
Expand Down

0 comments on commit f96d025

Please sign in to comment.