From f722d6cfeb74c21ccecc3f95fc4b2489cba2f758 Mon Sep 17 00:00:00 2001 From: KollaPriyanka <55626247+KollaPriyanka@users.noreply.github.com> Date: Wed, 24 Jun 2020 20:49:54 +0530 Subject: [PATCH 1/6] Create jenkinsfile --- jenkinsfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 jenkinsfile diff --git a/jenkinsfile b/jenkinsfile new file mode 100644 index 0000000..e593d08 --- /dev/null +++ b/jenkinsfile @@ -0,0 +1,15 @@ +pipeline { + + agent any + tools { + maven "Maven" + } + + stages { + stage('Compile-Build-Test ') { + steps { + sh 'mvn clean package' + } + } + } + } From 4787524604870251a22ff295c90ac7d8a553b7a5 Mon Sep 17 00:00:00 2001 From: KollaPriyanka <55626247+KollaPriyanka@users.noreply.github.com> Date: Thu, 25 Jun 2020 20:45:23 +0530 Subject: [PATCH 2/6] Update jenkinsfile --- jenkinsfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jenkinsfile b/jenkinsfile index e593d08..0610a2b 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -10,6 +10,13 @@ pipeline { steps { sh 'mvn clean package' } + + } + stage('Deploy to Development'){ + steps{ + // deploy adapters: [tomcat8(credentialsId: 'tomcat', path: '', url: 'http://18.224.251.223:8000/')], contextPath: null, onFailure: false, war: '**/*.war' + deploy adapters: [tomcat8(credentialsId: 'tomcat_cred', path: '', url: 'http://18.191.201.243:8080')], contextPath: 'bmi', onFailure: false, war: '**/*.war' + } } } } From a52e383cacb5ddb7d51389c46e8862da03454928 Mon Sep 17 00:00:00 2001 From: KollaPriyanka <55626247+KollaPriyanka@users.noreply.github.com> Date: Thu, 25 Jun 2020 20:46:45 +0530 Subject: [PATCH 3/6] Update jenkinsfile --- jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkinsfile b/jenkinsfile index 0610a2b..1a44acf 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -15,7 +15,7 @@ pipeline { stage('Deploy to Development'){ steps{ // deploy adapters: [tomcat8(credentialsId: 'tomcat', path: '', url: 'http://18.224.251.223:8000/')], contextPath: null, onFailure: false, war: '**/*.war' - deploy adapters: [tomcat8(credentialsId: 'tomcat_cred', path: '', url: 'http://18.191.201.243:8080')], contextPath: 'bmi', onFailure: false, war: '**/*.war' + deploy adapters: [tomcat8(credentialsId: 'tomcat_cred', path: '', url: 'http://18.191.201.243:8080')], contextPath: 'basic', onFailure: false, war: '**/*.war' } } } From af164a97b3b2cfc69fd059641aa956d97d1e7e5f Mon Sep 17 00:00:00 2001 From: KollaPriyanka <55626247+KollaPriyanka@users.noreply.github.com> Date: Thu, 25 Jun 2020 20:48:31 +0530 Subject: [PATCH 4/6] Update jenkinsfile --- jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkinsfile b/jenkinsfile index 1a44acf..95aeefc 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -15,7 +15,7 @@ pipeline { stage('Deploy to Development'){ steps{ // deploy adapters: [tomcat8(credentialsId: 'tomcat', path: '', url: 'http://18.224.251.223:8000/')], contextPath: null, onFailure: false, war: '**/*.war' - deploy adapters: [tomcat8(credentialsId: 'tomcat_cred', path: '', url: 'http://18.191.201.243:8080')], contextPath: 'basic', onFailure: false, war: '**/*.war' + deploy adapters: [tomcat8(credentialsId: 'tomcat_cred', path: '', url: 'http://18.191.201.243:8080')], contextPath: 'basic', onFailure: false, war: '**/*.jar' } } } From c148260b951076267f24c49440cee34388581ee5 Mon Sep 17 00:00:00 2001 From: KollaPriyanka <55626247+KollaPriyanka@users.noreply.github.com> Date: Fri, 26 Jun 2020 21:55:06 +0530 Subject: [PATCH 5/6] Update jenkinsfile --- jenkinsfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jenkinsfile b/jenkinsfile index 95aeefc..c77ec63 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -15,7 +15,10 @@ pipeline { stage('Deploy to Development'){ steps{ // deploy adapters: [tomcat8(credentialsId: 'tomcat', path: '', url: 'http://18.224.251.223:8000/')], contextPath: null, onFailure: false, war: '**/*.war' - deploy adapters: [tomcat8(credentialsId: 'tomcat_cred', path: '', url: 'http://18.191.201.243:8080')], contextPath: 'basic', onFailure: false, war: '**/*.jar' + // deploy adapters: [tomcat8(credentialsId: 'tomcat_cred', path: '', url: 'http://18.191.201.243:8080')], contextPath: 'basic', onFailure: false, war: '**/*.jar' + //sh 'curl http://18.191.201.243:8080//manager/text/undeploy?path=/BMI -u tomcat:secret' + sh 'curl -v -u tomcat:secret -T target/org.jacoco.examples.maven.java-1.0-SNAPSHOT.jar http://18.191.201.243:8080//manager/text/deploy?path=/BMI' + } } } From 2b2f6da5d47087f9d51af4ab1a4cc9ecf68beaff Mon Sep 17 00:00:00 2001 From: KollaPriyanka <55626247+KollaPriyanka@users.noreply.github.com> Date: Fri, 26 Jun 2020 21:58:42 +0530 Subject: [PATCH 6/6] Update jenkinsfile --- jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkinsfile b/jenkinsfile index c77ec63..c65f868 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -17,7 +17,7 @@ pipeline { // deploy adapters: [tomcat8(credentialsId: 'tomcat', path: '', url: 'http://18.224.251.223:8000/')], contextPath: null, onFailure: false, war: '**/*.war' // deploy adapters: [tomcat8(credentialsId: 'tomcat_cred', path: '', url: 'http://18.191.201.243:8080')], contextPath: 'basic', onFailure: false, war: '**/*.jar' //sh 'curl http://18.191.201.243:8080//manager/text/undeploy?path=/BMI -u tomcat:secret' - sh 'curl -v -u tomcat:secret -T target/org.jacoco.examples.maven.java-1.0-SNAPSHOT.jar http://18.191.201.243:8080//manager/text/deploy?path=/BMI' + sh 'curl -v -u tomcat:secret -T target/org.jacoco.examples.maven.java-1.0-SNAPSHOT.jar http://18.191.201.243:8080//manager/text/deploy?path=/examplejava' } }