I finally solved this by using Docker image layer caching for the npm install, following this answer
This means I moved the npm install out of the Docker slave image and into the actually frontend image, here is my final Docker file that truly caches the npm install in between builds if package.config has no changes:
MAINTAINER Brian Ogden
I'd set up my CI system to do this on every commit to master, that is, after the release branch merges.
The first very straightforward reason for this is that the commit to master gets tagged with the release, and you want the thing you ultimately publish to match exactly the version of the source code at the tag. While there shouldn't be any merge ...
Try piping your output to grep and then failing based off of the return code of grep:
npm install 2>&1 | grep "Error: connect ETIMEDOUT"
Per the grep documentation,
the exit status is 0 if a line is selected, 1 if no lines were selected, and 2 if an error occurred.
If needed, you can "not" the return code or just invert the conditional so that:
The issue is that prereqs-ubuntu.sh uses bash to install the npm. While the RUN directive uses sh to run the commands.
Where is the npm installed
root@2cd4a6af90f4:/app# type npm
npm is /root/.nvm/versions/node/v8.16.0/bin/npm
The PATH for the RUN directive
# echo $PATH
Dependabot and npm audit both poll the Node Security Working Group database for Node-based projects. However, Dependabot has the added ability to check dependencies in numerous other types of projects as well.
Also, each report Dependabot generates includes useful info and links directly to a GitHub Advisory Database listing (e.g., CVE-2017-16021) that ...
Version bumps should happen every single build. Waiting until a formal release and releasing everything as 1.0.0 is an option, but you should still know what build you are using in your alpha/beta.
Ultimately, the developer will have to determine if a major release increment is needed.
You should only do a major release bump if you introduced a breaking ...
Finally managed to generate the docker image for Angular. Here are is the screnshot.
I am listing the contents of the Docker File along with the comments that explain the reasoning and my learnings.
# Created by Sridhar Pandurangiah - 29 October 2020
# This Docker file helps create the containers for the Angular User Interface
#1 We would like to create ...
There are likely a multitude of issues that could be the root cause, as a starter for ten I would look at the following:
Is the ownership and permissions on the node_modules directory correct, i.e. does your Jenkins user have the permission to write to all of the files and directories in the folder. This is a common problem if you have multiple users ...
Welcome to devops.stackexchange.com.
What works best is dependent upon the team. Find a good tool for the team and perhaps change that when the circumstances change. Also you might do a little thinking ahead to work out what approach might be best fit for the near future (e.g., will my team expand? will my number of servers expand? will I have a security ...
There are now two possible solutions: One NPM only one, and a clean one.
First the NPM One (where im not quite sure what exactly will work):
I just googled "npm deployment" and found 3 different Plugins which do exactly that what you want ( 1, 2, 3) and there are many more. Which now you suits you best, will be your choice.
Now the cleaner one (because we ...