diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..4df207b --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,27 @@ +pipeline { + agent { + label 'tomcat-slave' +} + stages { + stage('Git checkout') { + steps { + git 'https://github.com/prem-opqtech/java_repo1.git' + } +} + stage('Build stage') { + steps { + sh 'mvn clean install'} +} + stage('Push to Artifactory') { + steps { + sleep 15} + } + stage('Deploy') { + steps { sh '''sudo cp /home/ec2-user/jenkins-slave1/workspace/cicd1/target/*.war /opt/apache-tomcat-9.0.64/webapps +''' + } +} + + + } +} diff --git a/file1 b/file1 new file mode 100644 index 0000000..cb4e766 --- /dev/null +++ b/file1 @@ -0,0 +1 @@ +to test poll scm trigger diff --git a/test b/test index d3a8557..4bdb588 100644 --- a/test +++ b/test @@ -1 +1,3 @@ -THis is to test POLL SCM Trigger +Test line +new line +webhook activated