Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 45 additions & 12 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,60 @@ pipeline {

stages {

stage('Clean Workspace') {
steps {
cleanWs()
}
}

stage('checkout') {
steps {
echo 'git checkout stage'
git branch: 'main', url: 'https://github.com/devopstraininghub/mindcircuit17d.git'
}
}
script {
try {
echo 'git checkout stage'
git branch: 'main', url: 'https://github.com/sivaramani12/mindcircuit-forked.git'
}
catch (Exception e) {
echo "${e.message}"
}
}
}
}

stage('build') {
steps {
echo 'Building with maven '
sh 'mvn clean install '
sh 'mvn clean install '
}
}

stage('Deploy') {
steps {
echo 'Deploying to tomcat'
deploy adapters: [tomcat9(alternativeDeploymentContext: '', credentialsId: 'tomcat', path: '', url: 'http://54.160.144.88:8081/')], contextPath: 'insta', war: '**/*.war'

stage('Deploy Parallel') {
parallel{
stage('Deploy to test') {
steps {
echo 'Deploying to tomcat test env'
deploy adapters: [tomcat9(alternativeDeploymentContext: '', credentialsId: 'tomcat', path: '', url: 'http://3.94.113.81:8080/')], contextPath: 'practice_29apr_2', war: '**/*.war'

}
}

}
}
stage('Deploy to stage') {
steps {
echo 'Deploying to tomcat stage env'
// deploy adapters: [tomcat9(alternativeDeploymentContext: '', credentialsId: 'tomcat', path: '', url: 'http://3.94.113.81:8080/')], contextPath: 'practice_29apr', war: '**/*.war'

}
}

stage('Deploy to dev') {
steps {
echo 'Deploying to tomcat dev env'
// deploy adapters: [tomcat9(alternativeDeploymentContext: '', credentialsId: 'tomcat', path: '', url: 'http://3.94.113.81:8080/')], contextPath: 'practice_29apr', war: '**/*.war'

}
}
}
}

}
}
1 change: 1 addition & 0 deletions Sample.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a sample file
1 change: 1 addition & 0 deletions Sample2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
siva
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.example</groupId>
<artifactId>facebookapp</artifactId>
<version>1.0.0</version>
<version>1.0.0-SNAPSHOT</version>
<packaging>war</packaging>

<properties>
Expand All @@ -17,12 +17,12 @@
<distributionManagement>
<snapshotRepository>
<id>NexusRepo</id>
<url>http://34.201.119.102:8081/repository/batch16d-repo-snapshot/</url>
<url>http://98.91.18.133:8081/repository/Sample-repo-snapshot//</url>
</snapshotRepository>

<repository>
<id>NexusRepo</id>
<url>http://34.201.119.102:8081/repository/batch16d-repo-release/</url>
<url>http://98.91.18.133:8081/repository/Sample-repo-release//</url>
</repository>
</distributionManagement>

Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<body style="background-color:orange;">

<h1>WELCOME TO JENKINS PIPELINE WORLD </h1>
<h1>Hi welcome to siva's repoooooooooo. Today's date is 22/04/26</h1>


</body>
Expand Down