Created
September 25, 2019 18:35
-
-
Save donhenton/87b281f7d132b2f7e97cd8689c7db040 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* sample Jenkins file for angular4-snippets project | |
doesn't work completely as it chokes on webpack | |
illustrates using docker image for building | |
problem is most likely the node version | |
attempting angular 4/6 build environment | |
*/ | |
pipeline { | |
environment { | |
registry = "my-registry:5000" | |
GIT_SSL_NO_VERIFY = 1 | |
NODE_TLS_REJECT_UNAUTHORIZED=0 | |
dockerImage = '' | |
} | |
agent { | |
docker { | |
image 'donhenton/docker-gulp-sass-node' | |
args '-p 3000:3000' | |
} | |
} | |
stages { | |
stage('Cloning Git') { | |
steps { | |
sh 'git config --global http.sslVerify "false"' | |
git 'https://github.com/donhenton/angular4-snippets.git' | |
} | |
} | |
stage('npm install') { | |
steps { | |
sh 'npm config set strict-ssl false' | |
sh 'npm install' | |
sh 'npm install -g @angular/cli@1.1.0' | |
sh 'npm install -g webpack@^3.1.0' | |
} | |
} | |
stage('build') { | |
steps { | |
sh 'ng build -prod' | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment