In the docs I've learned that I can clear cache by including cache: {} into my gitlab-ci.yml file like so:
I must be using it wrong though because this is what I read in build output:
I've got problem with this because few lines down I replaced npm ci with npm install --no-optional and the GitLab runner keeps calling npm ci
Any suggestions ?
Dockerfile:
###########
# BUILDER #
###########
FROM node:11.12.0-alpine as builder
WORKDIR /usr/src/app
ENV PATH /usr/src/app/node_modules/.bin:$PATH
COPY package.json /usr/src/app/package.json
COPY package-lock.json /usr/src/app/package-lock.json
RUN npm install --no-optional
RUN npm install react-scripts@2.1.8 -g --silent --no-optional
ARG REACT_APP_USERS_SERVICE_URL
ENV REACT_APP_USERS_SERVICE_URL $REACT_APP_USERS_SERVICE_URL
ARG NODE_ENV
ENV NODE_ENV $NODE_ENV
COPY . /usr/src/app
RUN npm run build

