diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..71ef6c7d --- /dev/null +++ b/Jenkinsfile @@ -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' + } + } + + } +} diff --git a/file 1 b/file 1 new file mode 100644 index 00000000..a5905cec --- /dev/null +++ b/file 1 @@ -0,0 +1,8 @@ +new file is added +adde slave tried +helloooo +helllo again +hey there +jhvjcjhc +hiiiiii +jumanjiibyeee diff --git a/pom.xml b/pom.xml index f9b4b08d..4fa2a7c5 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ maven-war-plugin - 2.6 + 3.2.2 WebContent false @@ -29,12 +29,12 @@ deployment Internal Releases - http://10.128.0.10:8081/repository/student-rel/ + http://172.31.21.5:8081/repository/maven-releases/ deployment Internal Snapshot Releases - http://10.128.0.10:8081/repository/student-snap/ + http://172.31.21.5:8081/repository/maven-snapshots/