Nrwl nx caching not working on docker container in jenkins

Viewed 1796

Nrwl nx caching not working on docker container in jenkins Each time i invoke the build the lint, build and test is running again instead of taking from cache .

Docker file

FROM kaptest/docker-atomapi-node:10

WORKDIR /app

# Install app dependencies
COPY package.json /app/
RUN npm install --quiet

# for merging cobertura
RUN wget https://gist.githubusercontent.com/tgsoverly/ef975d5b430fbce1eb33/raw/a4836655814bf09ac34bd42a6dd99f37aea7265d/merge-xml-coverage.py

# Bundle app source
COPY . /app

# Volume where the distributable site will be dropped
VOLUME /app/dist

CMD bash -c "npm run affected:lint -- --base=remotes/origin/master --head=HEAD --parallel --maxParallel=10 && \
  npm run affected:test -- --base=remotes/origin/master --head=HEAD --parallel --maxParallel=10 && \
  npm run affected:build -- --base=remotes/origin/master --prod --head=HEAD --parallel --maxParallel=10"
1 Answers
Related