From eb58adfa19c1f7761ad5f2ca9dddf6dc95577eb5 Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Thu, 25 Jul 2019 17:29:20 -0500 Subject: [PATCH 01/17] Create jenkinsfile --- jenkinsfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 jenkinsfile diff --git a/jenkinsfile b/jenkinsfile new file mode 100644 index 000000000..5ff0bd413 --- /dev/null +++ b/jenkinsfile @@ -0,0 +1,13 @@ +pipeline { + agent any + + stages { + stage('Build') { + steps { + sh 'make' (1) + archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true (2) + } + } + + } +} From 944076ea63902e07f0932c1def3a4736fa6f3767 Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Thu, 25 Jul 2019 17:35:06 -0500 Subject: [PATCH 02/17] Update jenkinsfile --- jenkinsfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/jenkinsfile b/jenkinsfile index 5ff0bd413..79ccbc6ab 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -5,9 +5,17 @@ pipeline { stage('Build') { steps { sh 'make' (1) - archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true (2) + archiveArtifacts artifacts: '**/target/*.war', fingerprint: true (2) } } - + stage('Deploy') { + when { + expression { + currentBuild.result == null || currentBuild.result == 'SUCCESS' (1) + } + } + steps { + sh 'make publish' + } } } From 983e3238877b45dab1e35aca76e9b6fb7d6ac4bf Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Thu, 25 Jul 2019 17:37:08 -0500 Subject: [PATCH 03/17] Update jenkinsfile --- jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/jenkinsfile b/jenkinsfile index 79ccbc6ab..f9792f478 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -18,4 +18,5 @@ pipeline { sh 'make publish' } } + } } From 983ccbb97a591685f328e2db158167cfab6f013a Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Thu, 25 Jul 2019 17:45:23 -0500 Subject: [PATCH 04/17] updated build job --- jenkinsfile | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/jenkinsfile b/jenkinsfile index f9792f478..647d5f647 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -4,19 +4,15 @@ pipeline { stages { stage('Build') { steps { - sh 'make' (1) - archiveArtifacts artifacts: '**/target/*.war', fingerprint: true (2) + sh 'mvn clean package' + } + post { + success + { + echo 'Now Archiving...' + archiveArtifacts artifacts: '**/target/*.war' + } } } - stage('Deploy') { - when { - expression { - currentBuild.result == null || currentBuild.result == 'SUCCESS' (1) - } - } - steps { - sh 'make publish' - } - } } } From 43de41757659a4c95aeb7017c788721f4049c8bb Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Thu, 25 Jul 2019 17:58:50 -0500 Subject: [PATCH 05/17] updating deploy --- jenkinsfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/jenkinsfile b/jenkinsfile index 647d5f647..152cd0644 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -1,6 +1,13 @@ pipeline { agent any +parameters { + string(name: 'tomcat_dev', defaultValue: '35.166.210.154', description: 'Staging Server') + + } + triggers { + pollSCM('* * * * *') // Polling Source Control + } stages { stage('Build') { steps { @@ -14,5 +21,10 @@ pipeline { } } } + stage('Deploy') { + steps { + sh "scp -i /home/jenkins/tomcat-demo.pem **/target/*.war ec2-user@${params.tomcat_dev}:/var/lib/tomcat7/webapps" + } + } } } From 9818d58b1eb3512ffdf9752afb34ce78729019f0 Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Thu, 25 Jul 2019 18:10:02 -0500 Subject: [PATCH 06/17] updated pem in deploy --- jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkinsfile b/jenkinsfile index 152cd0644..0c5f3e0ad 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent any parameters { - string(name: 'tomcat_dev', defaultValue: '35.166.210.154', description: 'Staging Server') + string(name: 'tomcat_dev', defaultValue: '3.19.73.24', description: 'Staging Server') } @@ -23,7 +23,7 @@ parameters { } stage('Deploy') { steps { - sh "scp -i /home/jenkins/tomcat-demo.pem **/target/*.war ec2-user@${params.tomcat_dev}:/var/lib/tomcat7/webapps" + sh "scp -i /Repo1/devops.pem **/target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" } } } From 6e81a3448885a34bec09985861568207ce5acbff Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Mon, 29 Jul 2019 18:18:31 -0500 Subject: [PATCH 07/17] added sudo --- jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkinsfile b/jenkinsfile index 0c5f3e0ad..5bad48336 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent any parameters { - string(name: 'tomcat_dev', defaultValue: '3.19.73.24', description: 'Staging Server') + string(name: 'tomcat_dev', defaultValue: '18.217.25.176', description: 'Staging Server') } @@ -23,7 +23,7 @@ parameters { } stage('Deploy') { steps { - sh "scp -i /Repo1/devops.pem **/target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" + sh "sudo scp -i /Repo1/devops.pem **/target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" } } } From fec65ff4780ac52b5af8f19460942207ce234854 Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Mon, 29 Jul 2019 18:28:19 -0500 Subject: [PATCH 08/17] update path --- jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkinsfile b/jenkinsfile index 5bad48336..b9cf8aee9 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -23,7 +23,7 @@ parameters { } stage('Deploy') { steps { - sh "sudo scp -i /Repo1/devops.pem **/target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" + sh "sudo scp -i /Repo1/devops.pem ./**/target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" } } } From bba98ed4df079890dc7565803f0542eb126cd8de Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Mon, 29 Jul 2019 18:31:53 -0500 Subject: [PATCH 09/17] added command --- jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jenkinsfile b/jenkinsfile index b9cf8aee9..0912cdabf 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -23,7 +23,8 @@ parameters { } stage('Deploy') { steps { - sh "sudo scp -i /Repo1/devops.pem ./**/target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" + sh "pwd && ls -la" + sh "sudo scp -i /Repo1/devops.pem ./target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" } } } From 84c3375e93fa2800cfd6e63a406c89875d50a0b2 Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Mon, 29 Jul 2019 19:08:37 -0500 Subject: [PATCH 10/17] Update jenkinsfile --- jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/jenkinsfile b/jenkinsfile index 0912cdabf..0f74c536a 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -24,6 +24,7 @@ parameters { stage('Deploy') { steps { sh "pwd && ls -la" + sh "sudo scp -i /Repo1/devops.pem ./target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" } } From db5ad367b7641926d7b79321b33b0a3e08ed0e3b Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Tue, 30 Jul 2019 22:56:34 -0500 Subject: [PATCH 11/17] added qa --- jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jenkinsfile b/jenkinsfile index 0f74c536a..b57843f80 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -2,6 +2,7 @@ pipeline { agent any parameters { string(name: 'tomcat_dev', defaultValue: '18.217.25.176', description: 'Staging Server') + string(name: 'tomcat_qa', defaultValue: '52.14.87.203', description: 'Qa Server') } @@ -26,6 +27,7 @@ parameters { sh "pwd && ls -la" sh "sudo scp -i /Repo1/devops.pem ./target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" + sh "sudo scp -i /Repo1/devops.pem ./target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" } } } From d83c3d553971fffebe203cde02a3f5aaa9e8998b Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Wed, 31 Jul 2019 11:59:30 -0500 Subject: [PATCH 12/17] added prod deploy --- jenkinsfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jenkinsfile b/jenkinsfile index b57843f80..1f1faabf1 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -1,14 +1,15 @@ pipeline { agent any parameters { - string(name: 'tomcat_dev', defaultValue: '18.217.25.176', description: 'Staging Server') - string(name: 'tomcat_qa', defaultValue: '52.14.87.203', description: 'Qa Server') + string(name: 'tomcat_dev', defaultValue: '3.19.56.58', description: 'Staging Server') + string(name: 'tomcat_prod', defaultValue: '18.218.209.248', description: 'Production Server') } triggers { pollSCM('* * * * *') // Polling Source Control } + stages { stage('Build') { steps { @@ -22,12 +23,13 @@ parameters { } } } + stage('Deploy') { steps { sh "pwd && ls -la" sh "sudo scp -i /Repo1/devops.pem ./target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" - sh "sudo scp -i /Repo1/devops.pem ./target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" + sh "sudo scp -i /Repo1/devo.pem ./target/*.war ec2-user@${params.tomcat_prod}:/root/apache-tomcat-7.0.53/webapps" } } } From bf75097688b5e6fce2fb1fda54f23ee9170376e0 Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Wed, 31 Jul 2019 12:11:02 -0500 Subject: [PATCH 13/17] Update jenkinsfile --- jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkinsfile b/jenkinsfile index 1f1faabf1..0f7b3684c 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -2,7 +2,7 @@ pipeline { agent any parameters { string(name: 'tomcat_dev', defaultValue: '3.19.56.58', description: 'Staging Server') - string(name: 'tomcat_prod', defaultValue: '18.218.209.248', description: 'Production Server') + } @@ -29,7 +29,7 @@ parameters { sh "pwd && ls -la" sh "sudo scp -i /Repo1/devops.pem ./target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" - sh "sudo scp -i /Repo1/devo.pem ./target/*.war ec2-user@${params.tomcat_prod}:/root/apache-tomcat-7.0.53/webapps" + } } } From 95feb83a7f0ea3df943ff45dc919b901c1dec935 Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Wed, 31 Jul 2019 12:17:25 -0500 Subject: [PATCH 14/17] Update jenkinsfile --- jenkinsfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jenkinsfile b/jenkinsfile index 0f7b3684c..0ec459983 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -1,9 +1,7 @@ pipeline { agent any parameters { - string(name: 'tomcat_dev', defaultValue: '3.19.56.58', description: 'Staging Server') - - + string(name: 'tomcat_dev', defaultValue: '3.19.56.58', description: 'Staging Server') } triggers { @@ -27,7 +25,6 @@ parameters { stage('Deploy') { steps { sh "pwd && ls -la" - sh "sudo scp -i /Repo1/devops.pem ./target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" } From bb2b3324404b8db505a07b436c0f987465fbd34b Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Wed, 31 Jul 2019 15:00:28 -0500 Subject: [PATCH 15/17] update prod --- jenkinsfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/jenkinsfile b/jenkinsfile index 0ec459983..d41173733 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -2,6 +2,7 @@ pipeline { agent any parameters { string(name: 'tomcat_dev', defaultValue: '3.19.56.58', description: 'Staging Server') + string(name: 'tomcat_prod', defaultValue: '18.218.209.248', description: 'Production Server') } triggers { @@ -21,13 +22,21 @@ parameters { } } } - - stage('Deploy') { + stage ('Deployments'){ + parallel{ + stage('Deploy to Staging') { steps { sh "pwd && ls -la" sh "sudo scp -i /Repo1/devops.pem ./target/*.war ec2-user@${params.tomcat_dev}:/opt/apache-tomcat-7.0.53/webapps" } } + stage ("Deploy to Production"){ + steps { + sh "scp -i /Repo1/devo.pem ./target/*.war ec2-user@${params.tomcat_prod}:/root/apache-tomcat-7.0.53/webapps" + } + } + } } + } } From d095b445e427f79fa23f3136ee66d507e31ae424 Mon Sep 17 00:00:00 2001 From: Priyachowdari <43457311+Priyachowdari@users.noreply.github.com> Date: Fri, 2 Aug 2019 14:02:11 -0500 Subject: [PATCH 16/17] Update jenkinsfile --- jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkinsfile b/jenkinsfile index d41173733..e4f3b604a 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent any parameters { - string(name: 'tomcat_dev', defaultValue: '3.19.56.58', description: 'Staging Server') + string(name: 'tomcat_dev', defaultValue: '13.59.98.137', description: 'Staging Server') string(name: 'tomcat_prod', defaultValue: '18.218.209.248', description: 'Production Server') } From 98be6084f04855a9904814b83cc8b01cdb2a9208 Mon Sep 17 00:00:00 2001 From: dileeppdk <54081492+dileeppdk@users.noreply.github.com> Date: Tue, 13 Aug 2019 18:36:37 -0500 Subject: [PATCH 17/17] create a file --- dil | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 dil diff --git a/dil b/dil new file mode 100644 index 000000000..b4096698b --- /dev/null +++ b/dil @@ -0,0 +1,2 @@ +vhbk +mnkjn