Skip to content

Commit a0d90e3

Browse files
authored
Update Jenkinsfile
1 parent 7820b3d commit a0d90e3

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Jenkinsfile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ pipeline {
55
stage("Test Application"){
66
steps {
77
nodejs(nodeJSInstallationName: 'nodejs') {
8-
sh 'npm run test'
8+
bat 'npm run test'
99
}
1010
}
1111
}
1212
stage("Build Application"){
1313
steps {
1414
nodejs(nodeJSInstallationName: 'nodejs') {
15-
sh 'npm install'
16-
sh 'npm run build'
15+
bat 'npm install'
16+
bat 'npm run build'
1717
}
1818
}
1919
}
2020
stage("Dockerize Application"){
2121
steps {
22-
sh 'docker build -t webapp .'
23-
sh 'docker images'
22+
bat 'docker build -t webapp .'
23+
bat 'docker images'
2424
}
2525
}
2626
stage("Push To DockerHub"){
@@ -30,20 +30,20 @@ pipeline {
3030
usernameVariable: "USERNAME",
3131
passwordVariable: "PASSWORD"
3232
)]) {
33-
sh 'docker login --username $USERNAME -- password PASSWORD'
34-
sh 'docker push webapp:dev'
33+
bat 'docker login --username $USERNAME -- password PASSWORD'
34+
bat 'docker push webapp:dev'
3535
}
3636
}
3737
}
3838
stage("Push To Github"){
3939
steps {
40-
sh 'git config --global user.email "auto@jenkins.com"'
41-
sh 'git config --global user.name "Jenkins"'
42-
sh 'git remote add jenkins https://github.com/lenn0n/jenkins-post-build.git'
43-
sh 'git add .'
44-
sh "git commit -m 'Commit from Jenkins'"
40+
bat 'git config --global user.email "auto@jenkins.com"'
41+
bat 'git config --global user.name "Jenkins"'
42+
bat 'git remote add jenkins https://github.com/lenn0n/jenkins-post-build.git'
43+
bat 'git add .'
44+
bat "git commit -m 'Commit from Jenkins'"
4545
withCredentials([gitUsernamePassword(credentialsId: 'gh-cred', gitToolName: 'Default')]) {
46-
sh "git push -u origin HEAD:jenkins"
46+
bat "git push -u origin HEAD:jenkins"
4747
}
4848
}
4949
}

0 commit comments

Comments
 (0)