Skip to content

Commit fdc7612

Browse files
Update Jenkinsfile
1 parent 368278b commit fdc7612

File tree

1 file changed

+4
-25
lines changed

1 file changed

+4
-25
lines changed

Jenkinsfile

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,20 @@ pipeline {
77
git 'https://github.com/rohith-marigowda/javaProject.git'
88
}
99
}
10-
stage('Build project') {
11-
steps {
12-
echo 'Build the above code using maven'
13-
sh 'mvn clean install'
14-
}
15-
}
16-
stage('Push artifactory') {
17-
steps {
18-
echo 'Once the package is created using build tools, push the artifactory to nexus or jfrogg'
19-
echo 'Note: We are not pushing any of our artifacts into maven remote repository'
20-
}
21-
}
22-
23-
//stage('Deploy') {
24-
//steps {
25-
//echo 'deploy the artifactories into the environments'
26-
// sh 'sudo cp /home/ec2-user/jenkins/workspace/cicd_master/target/*.war /opt/apache-tomcat-9.*/webapps/'
27-
// }
28-
// }
29-
stage('Deploy to master') {
10+
stage('masterBranch') {
3011
when {
3112
branch "master"
3213
}
3314
steps {
34-
echo 'deploy the artifactories into the environments'
35-
sh 'sudo cp /home/ec2-user/jenkins/workspace/cicd_master/target/*.war /opt/apache-tomcat-9.*/webapps/'
15+
echo 'Trigger the test cases when code is pushed to master branch'
3616
}
3717
}
38-
stage('Deploy to release branch') {
18+
stage('releaseBranch') {
3919
when {
4020
branch "release/*"
4121
}
4222
steps {
43-
echo 'deploy the artifactories into the environments'
44-
sh 'sudo cp /home/ec2-user/jenkins/workspace/cicd_release_2.0/target/*.war /opt/apache-tomcat-9.*/webapps/'
23+
echo 'Trigger the test cases when code is pushed to release branch'
4524
}
4625
}
4726
}

0 commit comments

Comments
 (0)