From c49bcaface81fbd27736aaf701c3e2b84142da1f Mon Sep 17 00:00:00 2001 From: roshanbore <144098732+roshanbore@users.noreply.github.com> Date: Fri, 13 Oct 2023 21:49:33 +0530 Subject: [PATCH 01/23] Create test.txt --- test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +test From 6d45c357d25e1ec2121499280224e539a9350738 Mon Sep 17 00:00:00 2001 From: roshanbore <144098732+roshanbore@users.noreply.github.com> Date: Sat, 14 Oct 2023 14:30:18 +0530 Subject: [PATCH 02/23] Create tesssst --- tesssst | 1 + 1 file changed, 1 insertion(+) create mode 100644 tesssst diff --git a/tesssst b/tesssst new file mode 100644 index 0000000..fe1a0dc --- /dev/null +++ b/tesssst @@ -0,0 +1 @@ +tesssst From a0a5191f6b56d32274a8beb79fce548eabe32717 Mon Sep 17 00:00:00 2001 From: roshanbore <144098732+roshanbore@users.noreply.github.com> Date: Sat, 14 Oct 2023 15:15:04 +0530 Subject: [PATCH 03/23] Create roshuuu --- roshuuu | 1 + 1 file changed, 1 insertion(+) create mode 100644 roshuuu diff --git a/roshuuu b/roshuuu new file mode 100644 index 0000000..e5665e3 --- /dev/null +++ b/roshuuu @@ -0,0 +1 @@ +roshuu test From d8310c019eaafe57a27647bc19707e0023604761 Mon Sep 17 00:00:00 2001 From: roshanbore <144098732+roshanbore@users.noreply.github.com> Date: Sat, 14 Oct 2023 15:22:24 +0530 Subject: [PATCH 04/23] Create webhook tessst --- webhook tessst | 1 + 1 file changed, 1 insertion(+) create mode 100644 webhook tessst diff --git a/webhook tessst b/webhook tessst new file mode 100644 index 0000000..9237be0 --- /dev/null +++ b/webhook tessst @@ -0,0 +1 @@ +webhok tessssss From 5e112922248d226f99b6218cfc276fe23dc373ea Mon Sep 17 00:00:00 2001 From: roshanbore <144098732+roshanbore@users.noreply.github.com> Date: Sat, 14 Oct 2023 15:23:15 +0530 Subject: [PATCH 05/23] Update tesssst --- tesssst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tesssst b/tesssst index fe1a0dc..b41257a 100644 --- a/tesssst +++ b/tesssst @@ -1 +1 @@ -tesssst + malli test tesssst From 0d8f5017809c30fbd3eda7587439f6281fd38771 Mon Sep 17 00:00:00 2001 From: roshanbore <144098732+roshanbore@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:53:36 +0530 Subject: [PATCH 06/23] Create mahabharat --- mahabharat | 1 + 1 file changed, 1 insertion(+) create mode 100644 mahabharat diff --git a/mahabharat b/mahabharat new file mode 100644 index 0000000..44a83a0 --- /dev/null +++ b/mahabharat @@ -0,0 +1 @@ +mahaaa bharat From c214a2e26c8233571638fb2b4470ac122321ca58 Mon Sep 17 00:00:00 2001 From: roshanbore <144098732+roshanbore@users.noreply.github.com> Date: Thu, 2 Nov 2023 16:31:07 +0530 Subject: [PATCH 07/23] Update roshuuu --- roshuuu | 1 + 1 file changed, 1 insertion(+) diff --git a/roshuuu b/roshuuu index e5665e3..5a2553b 100644 --- a/roshuuu +++ b/roshuuu @@ -1 +1,2 @@ roshuu test +tesstttt From 0f2051304431f2e6876703cf799a493e92787abb Mon Sep 17 00:00:00 2001 From: roshanbore <144098732+roshanbore@users.noreply.github.com> Date: Thu, 2 Nov 2023 16:39:27 +0530 Subject: [PATCH 08/23] Update tesssst --- tesssst | 1 + 1 file changed, 1 insertion(+) diff --git a/tesssst b/tesssst index b41257a..0039e90 100644 --- a/tesssst +++ b/tesssst @@ -1 +1,2 @@ malli test tesssst +inko test From 24966802818dc814316028ee76715d77f1b0b3db Mon Sep 17 00:00:00 2001 From: roshanbore <144098732+roshanbore@users.noreply.github.com> Date: Fri, 3 Nov 2023 23:18:15 +0530 Subject: [PATCH 09/23] Update Jenkinsfile --- Jenkinsfile | 103 ++++++++-------------------------------------------- 1 file changed, 15 insertions(+), 88 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 32ecbda..9c03590 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,99 +1,26 @@ pipeline { - agent none - tools{ - jdk 'myjava' - maven 'mymaven' - } - environment{ - IMAGE_NAME='devopstrainer/java-mvn-privaterepos:$BUILD_NUMBER' - DEV_SERVER_IP='ec2-user@13.233.245.74' - APP_NAME='java-mvn-app' - } + agent any + stages { - stage('COMPILE') { - agent any - tools{ - jdk 'myjava' - maven 'mymaven' - } + stage('compile') { steps { - script{ - echo "COMPILING THE CODE" - git 'https://github.com/preethid/addressbook.git' - tool name: 'mymaven', type: 'maven' - - sh 'mvn compile' - } - } + script { + echo 'compile the code' } - stage('UNITTEST'){ - agent any + } + } + stage('unit test') { steps { - script{ - echo "RUNNING THE UNIT TEST CASES" - sh 'mvn test' - } - - } - post{ - always{ - junit 'target/surefire-reports/*.xml' - } - } - } - stage('PACKAGE+BUILD DOCKER IMAGE ON BUILD SERVER'){ - agent any - steps{ - script{ - sshagent(['DEV_SERVER']) { - withCredentials([usernamePassword(credentialsId: 'docker-hub', passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME')]) { - echo "PACKAGING THE CODE" - sh "scp -o StrictHostKeyChecking=no server-script.sh ${DEV_SERVER_IP}:/home/ec2-user" - sh "ssh -o StrictHostKeyChecking=no ${DEV_SERVER_IP} 'bash ~/server-script.sh'" - sh "ssh ${DEV_SERVER_IP} sudo docker build -t ${IMAGE_NAME} /home/ec2-user/addressbook" - sh "ssh ${DEV_SERVER_IP} sudo docker login -u $USERNAME -p $PASSWORD" - sh "ssh ${DEV_SERVER_IP} sudo docker push ${IMAGE_NAME}" - } - } - } + script { + echo 'test the code' } } - stage("Provision deploy server with TF"){ - environment{ - AWS_ACCESS_KEY_ID =credentials("AWS_ACCESS_KEY_ID") - AWS_SECRET_ACCESS_KEY=credentials("AWS_SECRET_ACCESS_KEY") + stage('package') { + steps { + script { + echo 'package the code' } - agent any - steps{ - script{ - dir('terraform'){ - sh "terraform init" - sh "terraform apply --auto-approve" - EC2_PUBLIC_IP = sh( - script: "terraform output ip", - returnStdout: true - ).trim() - } - } - } } - stage('DEPLOY ON EC2 instance'){ - agent any - steps{ - script{ - echo "RUN THE APP ON ec2 instance" - echo "Waiting for ec2 instance to initialise" - sleep(time: 90, unit: "SECONDS") - echo "Deploying the app to ec2-instance provisioned bt TF" - echo "${EC2_PUBLIC_IP}" - sshagent(['DEV_SERVER']) { - withCredentials([usernamePassword(credentialsId: 'docker-hub', passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME')]) { - sh "ssh -o StrictHostKeyChecking=no ec2-user@${EC2_PUBLIC_IP} sudo docker login -u $USERNAME -p $PASSWORD" - sh "ssh ec2-user@${EC2_PUBLIC_IP} sudo docker run -itd -p 8080:8080 ${IMAGE_NAME}" - - } - } - } - }} + } } From 022e70fa9b8121ca17d2a778121c5307ae62e99a Mon Sep 17 00:00:00 2001 From: roshanbore Date: Sat, 4 Nov 2023 00:09:09 +0530 Subject: [PATCH 10/23] added --- mahabharat | 1 + nani | 1 + 2 files changed, 2 insertions(+) create mode 100644 nani diff --git a/mahabharat b/mahabharat index 44a83a0..685383a 100644 --- a/mahabharat +++ b/mahabharat @@ -1 +1,2 @@ mahaaa bharat +om nama shivaya dsdsd \ No newline at end of file diff --git a/nani b/nani new file mode 100644 index 0000000..9066fa8 --- /dev/null +++ b/nani @@ -0,0 +1 @@ +nani From 7732dffdba5ef9b316a2fe8d4788212d26cff5e3 Mon Sep 17 00:00:00 2001 From: roshanbore <144098732+roshanbore@users.noreply.github.com> Date: Sat, 4 Nov 2023 00:16:47 +0530 Subject: [PATCH 11/23] Update Jenkinsfile --- Jenkinsfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9c03590..7b0c850 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,22 +5,23 @@ pipeline { stage('compile') { steps { script { - echo 'compile the code' + echo 'compile the code' + } } } - } - stage('unit test') { + stage('unit test') { steps { script { - echo 'test the code' + echo 'test the code' + } } } - stage('package') { + stage('package') { steps { script { - echo 'package the code' + echo 'package the code' + } } } - } } From ac24c352c8196de61cf38357abab69d72dbcb846 Mon Sep 17 00:00:00 2001 From: roshanbore Date: Sat, 4 Nov 2023 00:39:41 +0530 Subject: [PATCH 12/23] hfh --- Jenkinsfile | 17 +++++++++-------- mahabharat | 4 ++-- roshuuu | 2 -- 3 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 roshuuu diff --git a/Jenkinsfile b/Jenkinsfile index 9c03590..1e662bb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,22 +5,23 @@ pipeline { stage('compile') { steps { script { - echo 'compile the code' + echo 'compile the code' + } } } - } - stage('unit test') { + stage('unit test') { steps { script { - echo 'test the code' + echo 'test the code' + } } } - stage('package') { + stage('package') { steps { script { - echo 'package the code' + echo 'package the code' + } } } - } -} +} \ No newline at end of file diff --git a/mahabharat b/mahabharat index 685383a..7af6bb5 100644 --- a/mahabharat +++ b/mahabharat @@ -1,2 +1,2 @@ -mahaaa bharat -om nama shivaya dsdsd \ No newline at end of file + +om nama shivaya \ No newline at end of file diff --git a/roshuuu b/roshuuu deleted file mode 100644 index 5a2553b..0000000 --- a/roshuuu +++ /dev/null @@ -1,2 +0,0 @@ -roshuu test -tesstttt From 1c7890f19fc5fd5f01d560a8e2acdfff22005802 Mon Sep 17 00:00:00 2001 From: roshanbore Date: Sat, 4 Nov 2023 00:50:46 +0530 Subject: [PATCH 13/23] h --- mahabharat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mahabharat b/mahabharat index 7af6bb5..ce97106 100644 --- a/mahabharat +++ b/mahabharat @@ -1,2 +1,3 @@ -om nama shivaya \ No newline at end of file +om nama shivaya +hara hara \ No newline at end of file From 555d197ee05aace4be2759a58c3c01f3ff3030db Mon Sep 17 00:00:00 2001 From: roshanbore Date: Sat, 4 Nov 2023 00:54:35 +0530 Subject: [PATCH 14/23] k --- Jenkinsfile | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index adec125..7b0c850 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,7 +7,6 @@ pipeline { script { echo 'compile the code' } -<<<<<<< HEAD } } stage('unit test') { @@ -26,23 +25,3 @@ pipeline { } } } -======= - } - } - stage('unit test') { - steps { - script { - echo 'test the code' - } - } - } - stage('package') { - steps { - script { - echo 'package the code' - } - } - } - } -} ->>>>>>> 7732dffdba5ef9b316a2fe8d4788212d26cff5e3 From 3ed9190f7afefad646d8c3d98b981cd800d9b1f9 Mon Sep 17 00:00:00 2001 From: roshanbore Date: Sat, 4 Nov 2023 00:55:07 +0530 Subject: [PATCH 15/23] k --- mahabharat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mahabharat b/mahabharat index ce97106..48ad8c0 100644 --- a/mahabharat +++ b/mahabharat @@ -1,3 +1,3 @@ om nama shivaya -hara hara \ No newline at end of file +hara hara shambho \ No newline at end of file From 7071de948521d53486dd2975dabf37d6556af03d Mon Sep 17 00:00:00 2001 From: roshanbore Date: Sat, 4 Nov 2023 01:04:14 +0530 Subject: [PATCH 16/23] k --- Jenkinsfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 7b0c850..11a0324 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,11 +1,16 @@ pipeline { agent any + + parameters{ + string(name:'roshu' ,defaultValue:'Test' ,description: 'version to deploy') + } stages { stage('compile') { steps { script { echo 'compile the code' + echo "roshan garu: ${params.roshu}" } } } From eae8799d49229a5aec8862fbd7dfa9023a342dad Mon Sep 17 00:00:00 2001 From: roshanbore Date: Sat, 4 Nov 2023 01:37:26 +0530 Subject: [PATCH 17/23] k --- Jenkinsfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 11a0324..ec44db7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,6 +3,8 @@ pipeline { parameters{ string(name:'roshu' ,defaultValue:'Test' ,description: 'version to deploy') + boolean(name: 'Laxman', defaultValue: true, description: 'head of the family') + choice(name: 'shiva', choices: ['manadev', 'nandi', 'parvathi'] ) } stages { @@ -15,6 +17,11 @@ pipeline { } } stage('unit test') { + when { + expressions{ + params.Laxman == true + } + } steps { script { echo 'test the code' @@ -25,6 +32,7 @@ pipeline { steps { script { echo 'package the code' + echo "packaging the code versio ${params.shiva}" } } } From ad24f3373b5e63df1e0b488b38ac8509f7544814 Mon Sep 17 00:00:00 2001 From: roshanbore Date: Sat, 4 Nov 2023 01:39:24 +0530 Subject: [PATCH 18/23] k --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ec44db7..7196537 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,7 +3,7 @@ pipeline { parameters{ string(name:'roshu' ,defaultValue:'Test' ,description: 'version to deploy') - boolean(name: 'Laxman', defaultValue: true, description: 'head of the family') + booleanParam(name: 'Laxman', defaultValue: true, description: 'head of the family') choice(name: 'shiva', choices: ['manadev', 'nandi', 'parvathi'] ) } From db0700d608d7852bb8d1e6a6289b35644141ab98 Mon Sep 17 00:00:00 2001 From: roshanbore Date: Sat, 4 Nov 2023 01:44:18 +0530 Subject: [PATCH 19/23] k --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7196537..f082e6e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,8 +3,8 @@ pipeline { parameters{ string(name:'roshu' ,defaultValue:'Test' ,description: 'version to deploy') - booleanParam(name: 'Laxman', defaultValue: true, description: 'head of the family') - choice(name: 'shiva', choices: ['manadev', 'nandi', 'parvathi'] ) + booleanParam(name: 'ExecuteTest', defaultValue: true, description: 'head of the family') + choice(name: 'appversion', choices: ['manadev', 'nandi', 'parvathi'] ) } stages { @@ -19,7 +19,7 @@ pipeline { stage('unit test') { when { expressions{ - params.Laxman == true + params.executeTests == true } } steps { From ade238a8f3247561c22405bebf2a2d580f1824ef Mon Sep 17 00:00:00 2001 From: roshanbore Date: Sat, 4 Nov 2023 01:46:40 +0530 Subject: [PATCH 20/23] k --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f082e6e..6a6ec72 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,8 +18,8 @@ pipeline { } stage('unit test') { when { - expressions{ - params.executeTests == true + expression { + params.ExecuteTests == true } } steps { From 84117c5a8ea69c5c8ef930c654d378ae6d53511f Mon Sep 17 00:00:00 2001 From: roshanbore Date: Sat, 4 Nov 2023 01:47:16 +0530 Subject: [PATCH 21/23] k --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6a6ec72..bf8b01a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,7 +19,7 @@ pipeline { stage('unit test') { when { expression { - params.ExecuteTests == true + params.ExecuteTest == true } } steps { From 2640f24533a0793360cc0fd2753bc3c18219c3ea Mon Sep 17 00:00:00 2001 From: roshanbore Date: Sat, 4 Nov 2023 02:02:09 +0530 Subject: [PATCH 22/23] k --- Jenkinsfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index bf8b01a..17c362b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,5 +36,21 @@ pipeline { } } } + stage('deploy') { + input { + message "select the version to deploy" + ok "version selected" + Parameters{ + choice(name:'newversion', choices['1', '2', '3']) + } + } + steps { + script { + echo 'deploy the app' + + } + } + } + } } From eea45e7c8006ce1f3be37b727e6f88b5187e57f4 Mon Sep 17 00:00:00 2001 From: roshanbore Date: Sat, 4 Nov 2023 02:05:09 +0530 Subject: [PATCH 23/23] k --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 17c362b..5878228 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,8 +40,8 @@ pipeline { input { message "select the version to deploy" ok "version selected" - Parameters{ - choice(name:'newversion', choices['1', '2', '3']) + parameters { + choice(name: 'newversion', choices: ['1', '2', '3']) } } steps {