File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ pipeline {
2+ agent {
3+ label ' slave1'
4+ }
5+
6+ stages {
7+ stage(' Git checkout' ) {
8+ steps {
9+ echo ' We are now checking out the git repository'
10+ git ' https://github.com/rohith-marigowda/javaProject.git'
11+ }
12+ }
13+ stage(' Build project' ) {
14+ steps {
15+ echo ' Build the above code using maven'
16+ sh ' mvn clean install'
17+ }
18+ }
19+ stage(' Push artifactory' ) {
20+ steps {
21+ echo ' Once the package is created using build tools, push the artifactory to nexus or jfrogg'
22+ echo ' Note: We are not pushing any of our artifacts into maven remote repository'
23+ }
24+ }
25+
26+ stage(' Deploy' ) {
27+ steps {
28+ echo ' deploy the artifactories into the environments'
29+ sh ' sudo cp /home/ec2-user/jenkins/workspace/cicd/target/*.war /opt/apache*/webapps/'
30+ }
31+ }
32+ }
33+ }
You can’t perform that action at this time.
0 commit comments