CI: removing npm token on build

This commit is contained in:
Arthur Simas
2022-07-06 11:55:19 -03:00
parent 65b2578f15
commit 2c099ba491
5 changed files with 10 additions and 26 deletions
+6 -13
View File
@@ -1,23 +1,16 @@
FROM node:18.3.0-alpine3.15 as packages
WORKDIR /packages
ARG NPM_TOKEN
COPY package.json .
COPY package-lock.json .
COPY .npmrc .
RUN apk update \
&& apk add --no-cache aws-cli \
&& aws codeartifact login --tool npm --repository dadosfera-npm --domain dadosfera --domain-owner 611330257153 --region us-east-1 \
&& npm install
RUN apk update && apk add curl unzip
RUN apk add --no-cache aws-cli
RUN aws codeartifact login --tool npm --repository dadosfera-npm --domain dadosfera --domain-owner 611330257153 --region us-east-1
RUN npm install
RUN rm -f ./.npmrc
FROM node:14.15.4-alpine3.12
FROM node:18.3.0-alpine3.15
WORKDIR /app
COPY . /app/
ARG NPM_TOKEN
COPY --from=packages /packages/node_modules /app/node_modules
RUN npm run build
EXPOSE 3333
ENTRYPOINT npm run start
ENTRYPOINT npm run start