fixed ordering in steps, optimized npm install
This commit is contained in:
parent
d2acdf4a91
commit
ff31d98a51
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@ -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}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user