fixed ordering in steps, optimized npm install

This commit is contained in:
Taylor Christie 2019-04-09 11:04:52 -06:00
parent d2acdf4a91
commit ff31d98a51

16
Jenkinsfile vendored
View File

@ -11,20 +11,20 @@ podTemplate(label: label, inheritFrom: 'base', , containers: [
}
stage('Install Dependencies') {
container('base') {
sh "npm ci"
sh "npm ci --only=production"
sh "npm install -g typescript"
}
}
stage('Run unit tests') {
container('base') {
sh "npm test"
}
}
stage('Build the Project') {
container('base') {
sh "tsc"
}
}
stage('Run unit tests') {
container('base') {
sh "npm test"
}
}
stage('Login to Dockerhub') {
withCredentials([usernamePassword(credentialsId: 'DockerHubAccessYardstick', usernameVariable: 'USER', passwordVariable: 'PASS')]) {
container('base') {
@ -34,13 +34,13 @@ podTemplate(label: label, inheritFrom: 'base', , containers: [
}
stage('Build the Docker Image') {
container('base') {
sh "make build"
sh "make build branch=${BRANCH_NAME}"
}
}
stage('Push the Docker Image') {
container('base') {
sh "make push"
sh "make push branch=${BRANCH_NAME}"
}
}
}