Skip to content

Commit 675b7d0

Browse files
authored
Update Jenkinsfile
1 parent a0d90e3 commit 675b7d0

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

Jenkinsfile

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -9,54 +9,54 @@ pipeline {
99
}
1010
}
1111
}
12-
stage("Build Application"){
13-
steps {
14-
nodejs(nodeJSInstallationName: 'nodejs') {
15-
bat 'npm install'
16-
bat 'npm run build'
17-
}
18-
}
19-
}
20-
stage("Dockerize Application"){
21-
steps {
22-
bat 'docker build -t webapp .'
23-
bat 'docker images'
24-
}
25-
}
26-
stage("Push To DockerHub"){
27-
steps {
28-
withCredentials ([
29-
usernamePassword(credentialsId: 'docker-cred',
30-
usernameVariable: "USERNAME",
31-
passwordVariable: "PASSWORD"
32-
)]) {
33-
bat 'docker login --username $USERNAME -- password PASSWORD'
34-
bat 'docker push webapp:dev'
35-
}
36-
}
37-
}
38-
stage("Push To Github"){
39-
steps {
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'"
45-
withCredentials([gitUsernamePassword(credentialsId: 'gh-cred', gitToolName: 'Default')]) {
46-
bat "git push -u origin HEAD:jenkins"
47-
}
48-
}
49-
}
50-
stage("Push To EC2"){
51-
steps {
12+
// stage("Build Application"){
13+
// steps {
14+
// nodejs(nodeJSInstallationName: 'nodejs') {
15+
// bat 'npm install'
16+
// bat 'npm run build'
17+
// }
18+
// }
19+
// }
20+
// stage("Dockerize Application"){
21+
// steps {
22+
// bat 'docker build -t webapp .'
23+
// bat 'docker images'
24+
// }
25+
// }
26+
// stage("Push To DockerHub"){
27+
// steps {
28+
// withCredentials ([
29+
// usernamePassword(credentialsId: 'docker-cred',
30+
// usernameVariable: "USERNAME",
31+
// passwordVariable: "PASSWORD"
32+
// )]) {
33+
// bat 'docker login --username $USERNAME -- password PASSWORD'
34+
// bat 'docker push webapp:dev'
35+
// }
36+
// }
37+
// }
38+
// stage("Push To Github"){
39+
// steps {
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'"
45+
// withCredentials([gitUsernamePassword(credentialsId: 'gh-cred', gitToolName: 'Default')]) {
46+
// bat "git push -u origin HEAD:jenkins"
47+
// }
48+
// }
49+
// }
50+
// stage("Push To EC2"){
51+
// steps {
5252

53-
}
54-
}
55-
stage("Restart Application (PM2, Deployments)"){
56-
steps {
53+
// }
54+
// }
55+
// stage("Restart Application (PM2, Deployments)"){
56+
// steps {
5757

58-
}
59-
}
58+
// }
59+
// }
6060

6161
}
6262

0 commit comments

Comments
 (0)