Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add npm audit to ci pipeline #91

Merged
merged 2 commits into from Aug 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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