Skip to content

Instantly share code, notes, and snippets.

@donhenton
Created September 25, 2019 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donhenton/87b281f7d132b2f7e97cd8689c7db040 to your computer and use it in GitHub Desktop.
Save donhenton/87b281f7d132b2f7e97cd8689c7db040 to your computer and use it in GitHub Desktop.
/* 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