diff --git a/Jenkinsfile b/Jenkinsfile index 8cfd137..0ab0ddb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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}" } } }