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
44 changes: 44 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
pipeline
{
agent{ label 'jenkins-slave-1'}

triggers
{
pollSCM '* * * * *'
}
stages
{
stage('scm checkout')
{
steps {
checkout scmGit(branches: [[name: '*/feat1']], extensions: [], userRemoteConfigs: [[url: 'https://github.com/itssanthosh44/mavenrepo.git']])
}
}
stage ('build'){
steps {
sh 'mvn package'
}
}

stage ('uploadArtifactory')
{
steps {
sh 'mvn deploy'
}
}
stage ('installApplication')
{
steps {
sh 'scp /root/workspace/build1/feature1/target/*.war root@172.31.94.169:/opt/apache-tomcat-9.0.55/webapps'
}
}

stage('postBuildNotification')
{
steps{
emailext body: '$DEFAULT_CONTENT', subject: '$DEFAULT_SUBJECT', to: 'patnalasantosh97@gmail.com, yadamshashi@gmail.com'
}
}

}
}
8 changes: 8 additions & 0 deletions file 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
new file is added
adde slave tried
helloooo
helllo again
hey there
jhvjcjhc
hiiiiii
jumanjiibyeee
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<version>3.2.2</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
Expand All @@ -29,12 +29,12 @@
<repository>
<id>deployment</id>
<name>Internal Releases</name>
<url>http://10.128.0.10:8081/repository/student-rel/</url>
<url>http://172.31.21.5:8081/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>deployment</id>
<name>Internal Snapshot Releases</name>
<url>http://10.128.0.10:8081/repository/student-snap/</url>
<url>http://172.31.21.5:8081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
<dependencies>
Expand Down