Skip to content

Commit 35a0f21

Browse files
authored
Update Jenkinsfile
1 parent 59678bb commit 35a0f21

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Jenkinsfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@ pipeline {
1818
}
1919
}
2020
stage("Dockerize Application"){
21-
steps {
22-
bat 'docker build . -t lennonjansuy/webapp:dev'
23-
bat 'docker images'
24-
}
25-
}
26-
stage("Push To DockerHub"){
2721
steps {
2822
withCredentials ([
2923
usernamePassword(credentialsId: 'docker-cred',
3024
usernameVariable: "USERNAME",
3125
passwordVariable: "PASSWORD"
3226
)]) {
3327
bat "docker login --username $USERNAME --password $PASSWORD"
34-
bat 'docker push lennonjansuy/webapp:dev'
28+
bat 'docker build . -t lennonjansuy/webapp:dev'
29+
bat 'docker images'
3530
}
3631
}
3732
}
33+
stage("Push To DockerHub"){
34+
steps {
35+
bat 'docker push lennonjansuy/webapp:dev'
36+
}
37+
}
3838
stage("Push To Github (Clone build to other repo)"){
3939
steps {
4040
withCredentials([gitUsernamePassword(credentialsId: 'gh-cred', gitToolName: 'Default')]) {

0 commit comments

Comments
 (0)