From b2b72b964606e464420b447280e4bdd78c877c5b Mon Sep 17 00:00:00 2001 From: Mithun Technologies Date: Fri, 29 Mar 2024 20:09:14 +0530 Subject: [PATCH 1/9] Update JenkinsfileJan2024 --- JenkinsfileJan2024 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/JenkinsfileJan2024 b/JenkinsfileJan2024 index cc8d7324d4..6e81fdab1e 100644 --- a/JenkinsfileJan2024 +++ b/JenkinsfileJan2024 @@ -6,6 +6,12 @@ tools{ maven 'maven3.9.6' } +echo "The Job name is: ${env.JOB_NAME}" +echo "The Nod ename is: ${env.NODE_NAME}" +echo "The Build Number is: ${env.BUILD_NUMBER}" +echo "The Jenkins Home directory is: ${JENKINS_HOME}" + + //Checkout code stages{ stage('CheckOuteCode'){ From eab2190ded9a40afe4d0abb02e0b118434945323 Mon Sep 17 00:00:00 2001 From: ashwini Date: Mon, 1 Apr 2024 13:59:39 +0530 Subject: [PATCH 2/9] beku --- Jenkinsfile1 | 75 --------------------------- Jenkinsfile7AMNovBatch2022 | 49 ------------------ JenkinsfileApril6AMBatch | 36 ------------- JenkinsfileAugBacth2022 | 84 ------------------------------ JenkinsfileFeb7.30Batch | 35 ------------- JenkinsfileJan2024 | 93 --------------------------------- JenkinsfileJune2023 | 37 ------------- JenkinsfileMarch2023 | 39 -------------- JenkinsfileMarchdp | 103 ------------------------------------- JenkinsfileOctBatch2022 | 84 ------------------------------ JenkinsfileSepBatch | 52 ------------------- JenkinsfileSepBatch2022 | 75 --------------------------- Jenkinsparalleljob | 39 -------------- Jenkinspipeline | 38 -------------- JenkinswithAnsible | 49 ------------------ 15 files changed, 888 deletions(-) delete mode 100644 Jenkinsfile1 delete mode 100644 Jenkinsfile7AMNovBatch2022 delete mode 100644 JenkinsfileApril6AMBatch delete mode 100644 JenkinsfileAugBacth2022 delete mode 100644 JenkinsfileFeb7.30Batch delete mode 100644 JenkinsfileJan2024 delete mode 100644 JenkinsfileJune2023 delete mode 100644 JenkinsfileMarch2023 delete mode 100644 JenkinsfileMarchdp delete mode 100644 JenkinsfileOctBatch2022 delete mode 100644 JenkinsfileSepBatch delete mode 100644 JenkinsfileSepBatch2022 delete mode 100644 Jenkinsparalleljob delete mode 100644 Jenkinspipeline delete mode 100644 JenkinswithAnsible diff --git a/Jenkinsfile1 b/Jenkinsfile1 deleted file mode 100644 index a264b82a31..0000000000 --- a/Jenkinsfile1 +++ /dev/null @@ -1,75 +0,0 @@ -pipeline{ - -agent any - -tools{ -maven 'maven3.8.2' - -} - -triggers{ -pollSCM('* * * * *') -} - -options{ -timestamps() -buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')) -} - -stages{ - - stage('CheckOutCode'){ - steps{ - git branch: 'development', credentialsId: '957b543e-6f77-4cef-9aec-82e9b0230975', url: 'https://github.com/devopstrainingblr/maven-web-application-1.git' - - } - } - - stage('Build'){ - steps{ - sh "mvn clean package" - } - } -/* - stage('ExecuteSonarQubeReport'){ - steps{ - sh "mvn clean sonar:sonar" - } - } - - stage('UploadArtifactsIntoNexus'){ - steps{ - sh "mvn clean deploy" - } - } - - stage('DeployAppIntoTomcat'){ - steps{ - sshagent(['bfe1b3c1-c29b-4a4d-b97a-c068b7748cd0']) { - sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@35.154.190.162:/opt/apache-tomcat-9.0.50/webapps/" - } - } - } - */ -}//Stages Closing - -post{ - - success{ - emailext to: 'devopstrainingblr@gmail.com,mithuntechnologies@yahoo.com', - subject: "Pipeline Build is over .. Build # is ..${env.BUILD_NUMBER} and Build status is.. ${currentBuild.result}.", - body: "Pipeline Build is over .. Build # is ..${env.BUILD_NUMBER} and Build status is.. ${currentBuild.result}.", - replyTo: 'devopstrainingblr@gmail.com' - } - - failure{ - emailext to: 'devopstrainingblr@gmail.com,mithuntechnologies@yahoo.com', - subject: "Pipeline Build is over .. Build # is ..${env.BUILD_NUMBER} and Build status is.. ${currentBuild.result}.", - body: "Pipeline Build is over .. Build # is ..${env.BUILD_NUMBER} and Build status is.. ${currentBuild.result}.", - replyTo: 'devopstrainingblr@gmail.com' - } - -} - - -}//Pipeline closing diff --git a/Jenkinsfile7AMNovBatch2022 b/Jenkinsfile7AMNovBatch2022 deleted file mode 100644 index e40817d597..0000000000 --- a/Jenkinsfile7AMNovBatch2022 +++ /dev/null @@ -1,49 +0,0 @@ -node{ - -properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')), [$class: 'JobLocalConfiguration', changeReasonComment: ''], pipelineTriggers([pollSCM('* * * * *')])]) - -echo "The Job name is: ${env.JOB_NAME}" -echo "The Nod ename is: ${env.NODE_NAME}" -echo "The Build Number is: ${env.BUILD_NUMBER}" -echo "The Jenkins Home directory is: ${JENKINS_HOME}" - -def mavenHome = tool name: "maven3.8.6" - -try{ -sendSlackNotifications("STARTED") - -stage('CheckoutCode'){ -git branch: 'development', credentialsId: 'd3b6896a-ebbd-4396-8b5c-850f74d96a39', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' -} - -stage('Build'){ -sh "${mavenHome}/bin/mvn clean package" -} -/* -stage('ExecuteSonarQubeReport'){ -sh "${mavenHome}/bin/mvn sonar:sonar" -} - -stage('UploadArtifactsIntoNexus'){ -sh "${mavenHome}/bin/mvn deploy" -} - -stage('DeployAppIntoTomcatServer'){ -sshagent(['48c992f5-c73e-40ba-b71b-9191b6f93285']) { - sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@172.31.10.36:/usr/local/apache-tomcat-9.0.70/webapps/" -} -} - -*/ -}//try closing -catch(e){ -currentBuild.result = "FAILURE" -} -finally{ -sendSlackNotifications(currentBuild.result) -} - -} - - - diff --git a/JenkinsfileApril6AMBatch b/JenkinsfileApril6AMBatch deleted file mode 100644 index 2a0e892ecd..0000000000 --- a/JenkinsfileApril6AMBatch +++ /dev/null @@ -1,36 +0,0 @@ -node{ - -def mavenHome = tool name: 'maven3.9.2' - -echo "Job name is: $JOB_NAME" -echo "Node name is: $NODE_NAME" -echo "Jenkins Home url is: $JENKINS_HOME" - -properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')), [$class: 'JobLocalConfiguration', changeReasonComment: ''], pipelineTriggers([pollSCM('* * * * *')])]) - -stage('CheckOutCode'){ -git branch: 'development', credentialsId: '7234a3b2-097a-4e4b-a14d-a9e98131fa2b', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' -} - -stage('Build'){ -sh "${mavenHome}/bin/mvn clean package" -} - -/* -stage('ExecuteSonarQubeReport'){ -sh "${mavenHome}/bin/mvn clean sonar:sonar" -} - -stage('UploadArtifactsIntoNexus'){ -sh "${mavenHome}/bin/mvn clean deploy" -} - -stage('DeployAppIntoTomcatServer'){ -sshagent(['2d6c465d-3f2c-4356-83b4-6c4928ec54c6']) { - sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@172.31.26.193:/opt/apache-tomcat-9.0.75/webapps/" -} -} -*/ - - -} diff --git a/JenkinsfileAugBacth2022 b/JenkinsfileAugBacth2022 deleted file mode 100644 index 705a8bca1e..0000000000 --- a/JenkinsfileAugBacth2022 +++ /dev/null @@ -1,84 +0,0 @@ -@Library('sharedlibsmss') _ -node{ - -try{ - - sendSlackNotifications('STARTED') - def mavenHome = tool name: 'maven3.8.6' - - echo "The JobName is: ${env.JOB_NAME}" - echo "The node name is: ${env.NODE_NAME}" - echo "The build number is: ${env.BUILD_NUMBER}" - - properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')), [$class: 'JobLocalConfiguration', changeReasonComment: ''], pipelineTriggers([pollSCM('* * * * *')])]) - - - stage('CheckOutCode'){ - git branch: 'development', credentialsId: '1ed3c65b-4e6a-46ae-9e15-56aab257dac5', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' - } - - stage('Build'){ - sh "${mavenHome}/bin/mvn package" - } - - /* - stage('ExecuteSoanrQubeReport') - { - sh "${mavenHome}/bin/mvn clean sonar:sonar" - } - - stage('UploadArtifactsIntoNexus') - { - sh "${mavenHome}/bin/mvn clean deploy" - } - - stage('DeployAppIntoTomcatServer'){ - sshagent(['ed3c425a-5ed2-4384-99c1-12cc22911ec4']) { - sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@172.31.42.12:/opt/apache-tomcat-9.0.67/webapps/" - } - } - */ - }//try closing - catch(e){ - currentBuild.result="FAILURE" - throw e - }//catch closing - finally{ - sendSlackNotifications(currentBuild.result) - } -} //Node closing - -/* -//Code Snippet for sending slack notifications. - -def slackNotifications(String buildStatus = 'STARTED') { - // build status of null means successful - buildStatus = buildStatus ?: 'SUCCESS' - //buildStatus = buildStatus ? "SUCCESS":"FAILURE" - - // Default values - def colorName = 'RED' - def colorCode = '#FF0000' - def subject = "${buildStatus}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'" - def summary = "${subject} (${env.BUILD_URL})" - - // Override default values based on build status - if (buildStatus == 'STARTED') { - colorName = 'ORANGE' - colorCode = '#FFA500' - } else if (buildStatus == 'SUCCESS') { - colorName = 'GREEN' - colorCode = '#00FF00' - } else { - colorName = 'RED' - colorCode = '#FF0000' - } - - // Send notifications - slackSend (color: colorCode, message: summary, channel: "#walmart") -} - -*/ - - - diff --git a/JenkinsfileFeb7.30Batch b/JenkinsfileFeb7.30Batch deleted file mode 100644 index 8267a351ac..0000000000 --- a/JenkinsfileFeb7.30Batch +++ /dev/null @@ -1,35 +0,0 @@ -node{ - - echo "The Job name is: ${JOB_NAME}" -echo "The buils number is: ${BUILD_NUMBER}" -echo "The node name is : ${NODE_NAME}" - -properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')), [$class: 'JobLocalConfiguration', changeReasonComment: ''], pipelineTriggers([pollSCM('* * * * *')])]) - -def mavenHome = tool name: 'maven3.8.8' - -stage('CheckoutCode'){ -git branch: 'development', credentialsId: '4768a632-7cb1-4a54-96e5-816d16a40c7f', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' -} - -stage('Build'){ -sh "${mavenHome}/bin/mvn clean package" -} - -/* -stage('ExecuteSonarQubeReport'){ -sh "${mavenHome}/bin/mvn clean sonar:sonar" -} - -stage('UploadArtifactsIntoNexus'){ -sh "${mavenHome}/bin/mvn clean deploy" -} - -stage('DeployAppintoTomcat'){ -sshagent(['a2296f55-cf3b-4b3f-a5b5-17b11d8b83f2']) { - sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@172.31.44.186:/opt/apache-tomcat-9.0.73/webapps/" -} -} -*/ - -} diff --git a/JenkinsfileJan2024 b/JenkinsfileJan2024 deleted file mode 100644 index 6e81fdab1e..0000000000 --- a/JenkinsfileJan2024 +++ /dev/null @@ -1,93 +0,0 @@ -pipeline{ - -agent any - -tools{ -maven 'maven3.9.6' -} - -echo "The Job name is: ${env.JOB_NAME}" -echo "The Nod ename is: ${env.NODE_NAME}" -echo "The Build Number is: ${env.BUILD_NUMBER}" -echo "The Jenkins Home directory is: ${JENKINS_HOME}" - - -//Checkout code -stages{ - stage('CheckOuteCode'){ - steps{ - sendSlackNotifications("STARTED") - git branch: 'development', credentialsId: 'f4d44680-6f7c-4889-b836-5ce7015057f8', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' - } - } - //Build - stage('Build'){ - steps{ - sh "mvn clean package" - } - } - /* - //Execute SonarQube Report - stage('ExecuteSonarQubeReport'){ - steps{ - sh "mvn clean sonar:sonar" - } - } - - // Upload Artifcats into Nexus - stage('UploadArtifcatsIntoNexus'){ - steps{ - sh "mvn clean deploy" - } - } - -//Deploy App into Tomcat Server -stage('DeployAppIntoTomcat'){ - steps{ - sshagent(['ea56a0ef-94e7-43c1-99e3-d7e0947043a3']) { - sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@172.31.1.56:/opt/apache-tomcat-9.0.86/webapps/" -} -} - } -*/ -}//stages closing - -post { - success { - sendSlackNotifications(currentBuild.result) - } - failure { - sendSlackNotifications(currentBuild.result) - } -} -}//pipeline closing - - -def sendSlackNotifications(String buildStatus = 'STARTED') { - // build status of null means successful - buildStatus = buildStatus ?: 'SUCCESS' - - // Default values - def colorName = 'RED' - def colorCode = '#FF0000' - def subject = "${buildStatus}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'" - def summary = "${subject} (${env.BUILD_URL})" - - // Override default values based on build status - if (buildStatus == 'STARTED') { - colorName = 'YELLOW' - colorCode = '#FFFF00' - } else if (buildStatus == 'SUCCESS') { - colorName = 'GREEN' - colorCode = '#00FF00' - } else { - colorName = 'RED' - colorCode = '#FF0000' - } - - // Send notifications - slackSend (color: colorCode, message: summary, channel: "citibank-project") -} - - - diff --git a/JenkinsfileJune2023 b/JenkinsfileJune2023 deleted file mode 100644 index b8c25771aa..0000000000 --- a/JenkinsfileJune2023 +++ /dev/null @@ -1,37 +0,0 @@ -node{ - - -echo "Jenkins Home dir is: ${env.JENKINS_HOME}" -echo "Job name is: ${env.JOB_NAME}" -echo "Build number is: ${env.BUILD_NUMBER}" - -//properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')), [$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], [$class: 'JobLocalConfiguration', changeReasonComment: ''], pipelineTriggers([pollSCM('* * * * *')])]) - - -def mavenHome=tool name: 'maven3.9.3' - -stage('CheckOutCode'){ -git branch: 'development', credentialsId: 'c4900e7a-ccd3-4a5a-8604-b81f52bdc0f2', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' -} - -stage('Build'){ -sh "${mavenHome}/bin/mvn clean package" -} -/* -stage('ExecuteSonarQubeReport'){ -sh "${mavenHome}/bin/mvn clean sonar:sonar" -} - -stage('UploadArtifactsInotNexus'){ -sh "${mavenHome}/bin/mvn clean deploy" -} - - -stage('DeploAppIntoTomcatServer'){ -sshagent(['331ae6af-906c-4d4f-8317-0379a46b437e']) { - sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@172.31.2.79:/opt/apache-tomcat-9.0.76/webapps/" -} -} -*/ - -} diff --git a/JenkinsfileMarch2023 b/JenkinsfileMarch2023 deleted file mode 100644 index 926390284e..0000000000 --- a/JenkinsfileMarch2023 +++ /dev/null @@ -1,39 +0,0 @@ -node{ - - -properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')), [$class: 'JobLocalConfiguration', changeReasonComment: ''], pipelineTriggers([pollSCM('* * * * *')])]) - -def mavenHome = tool name: 'maven3.9.1' - -echo "The Job name is: ${JOB_NAME} " -echo "The Node name is: ${NODE_NAME}" -echo "The Build Number is: ${BUILD_NUMBER}" -echo "Jenkins Home path is: ${JENKINS_HOME}" - - -stage('CheckoutCode'){ -git branch: 'development', credentialsId: 'aaa8e2c0-226a-40ba-85eb-259762d67c15', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' -} - -stage('Build') -{ -sh "${mavenHome}/bin/mvn clean package" -} - - /* -stage('SonarQubeReport'){ -sh "${mavenHome}/bin/mvn clean sonar:sonar" -} - -stage('UploadArtifactsIntoNexus'){ -sh "${mavenHome}/bin/mvn clean deploy" -} - -stage('DeployAppIntoTomcat'){ -sshagent(['dd085870-ab36-4a86-9f5b-a915e179d45d']) { - sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@172.31.40.86:/opt/apache-tomcat-9.0.73/webapps/" -} -} -*/ - -}//node closing diff --git a/JenkinsfileMarchdp b/JenkinsfileMarchdp deleted file mode 100644 index 0918280faa..0000000000 --- a/JenkinsfileMarchdp +++ /dev/null @@ -1,103 +0,0 @@ -pipeline{ - -agent any - -parameters { - choice choices: ['master', 'development', 'stage', 'uat'], description: 'Select the Branch Name', name: 'BranchName' - string defaultValue: 'Mithun Software Solutions', name: 'PersonName' -} - - -tools{ -maven 'maven3.9.1' -} - -options { - buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5') - timestamps() -} - - -triggers { - pollSCM('* * * * * ') -} - - -stages{ - stage('CheckoutCode'){ - steps{ - sendSlackNotifications('STARTED') - git branch: "${params.BranchName}", credentialsId: 'aaa8e2c0-226a-40ba-85eb-259762d67c15', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' - } - } - -stage('Build'){ -steps{ -sh "mvn clean package" -} -} -/* -//Execute SonarQube Report -stage('ExecuteSonarQubeReport'){ -steps{ -sh "mvn clean sonar:sonar" -} -} - -//UploadArtifactsIntoNexus -stage('ArtifactsIntoNexus'){ -steps{ -sh "mvn clean deploy" -} -} - -//DeployApplication into TOmcat Server -stage('DeploApp'){ -steps{ -sshagent(['dd085870-ab36-4a86-9f5b-a915e179d45d']) { - sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@172.31.40.86:/opt/apache-tomcat-9.0.73/webapps/" -} -} -} -*/ - -}//stages closing -post { - success { - sendSlackNotifications(currentBuild.result) - } - failure { - sendSlackNotifications(currentBuild.result) - } -} - -}//pipeline closing - -//Function for slack notifications -def sendSlackNotifications(String buildStatus = 'STARTED') { - // build status of null means successful - buildStatus = buildStatus ?: 'SUCCESS' - - // Default values - def colorName = 'RED' - def colorCode = '#FF0000' - def subject = "${buildStatus}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'" - def summary = "${subject} (${env.BUILD_URL})" - - // Override default values based on build status - if (buildStatus == 'STARTED') { - color = 'YELLOW' - colorCode = '#FFFF00' - } else if (buildStatus == 'SUCCESS') { - colorName = 'GREEN' - colorCode = '#00FF00' - } else { - colorName = 'RED' - colorCode = '#FF0000' - } - - // Send notifications - slackSend (color: colorCode, message: summary, channel: '#citibank') -} - - diff --git a/JenkinsfileOctBatch2022 b/JenkinsfileOctBatch2022 deleted file mode 100644 index f48a667761..0000000000 --- a/JenkinsfileOctBatch2022 +++ /dev/null @@ -1,84 +0,0 @@ -node{ - -try{ - - def mavenHome = tool name: 'maven3.8.5' - - echo "The Job name is: ${env.JOB_NAME}" - echo "The Build numebr is: ${env.BUILD_NUMBER}" - echo "The node name is: ${env.NODE_NAME}" - -properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')), [$class: 'JobLocalConfiguration', changeReasonComment: ''], pipelineTriggers([pollSCM('* * * * *')])]) - - -//Checkout Code State -stage('CheckoutCode'){ -sendSlackNotifications("STARTED") -git branch: 'development', credentialsId: '7c0bd52e-8700-404b-a704-444a4f556b2f', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' -} - -//Build -stage('Build'){ -sh "${mavenHome}/bin/mvn clean package" -} - - /* -//Execute SonarQube Report -stage('ExecuteSonarQubeReport'){ -sh "${mavenHome}/bin/mvn sonar:sonar" -} - -//UploadArtifcats Into Nexus -stage('UploadArtifcatsIntoNexus'){ -sh "${mavenHome}/bin/mvn deploy" -} - -//Deploy App into Tomcat Server -stage('DeployApp'){ -sshagent(['e83477fc-0cee-45ee-a412-92e2240a7256']) { - sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@172.31.40.1:/opt/apache-tomcat-9.0.68/webapps/" -} -} -*/ - -}//try closing -catch(e){ -currentBuild.result = "FAILURE" -} -finally{ -sendSlackNotifications(currentBuild.result) -} - -}//node closing - -//Function for slack notifications - -def sendSlackNotifications(String buildStatus = 'STARTED') { - // build status of null means successful - buildStatus = buildStatus ?: 'SUCCESS' - - // Default values - def colorName = 'RED' - def colorCode = '#FF0000' - def subject = "${buildStatus}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'" - def summary = "${subject} (${env.BUILD_URL})" - - // Override default values based on build status - if (buildStatus == 'STARTED') { - colorName = 'ORANGE' - colorCode = '#FFA500' - } else if (buildStatus == 'SUCCESS') { - colorName = 'GREEN' - colorCode = '#00FF00' - } else { - colorName = 'RED' - colorCode = '#FF0000' - } - - // Send notifications - slackSend (color: colorCode, message: summary) -} - - - - diff --git a/JenkinsfileSepBatch b/JenkinsfileSepBatch deleted file mode 100644 index 861f541301..0000000000 --- a/JenkinsfileSepBatch +++ /dev/null @@ -1,52 +0,0 @@ -node('wallmart-node'){ - - -//echo "GitHub BranhName ${env.BRANCH_NAME}" - //echo "Jenkins Job Number ${env.BUILD_NUMBER}" - echo "Jenkins Node Name ${env.NODE_NAME}" - - echo "Jenkins Home ${env.JENKINS_HOME}" - echo "Jenkins URL ${env.JENKINS_URL}" - echo "JOB Name ${env.JOB_NAME}" - - -def mavenHome = tool name: "maven3.8.3" - -properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')), [$class: 'JobLocalConfiguration', changeReasonComment: ''], pipelineTriggers([pollSCM('* * * * *')])]) - - - -stage('CheckOutCode'){ -git branch: 'development', credentialsId: '9aad10da-e742-413a-a2f6-ce6a8b007f70', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' -} - -stage('Build'){ -sh "${mavenHome}/bin/mvn clean package" -} -/* -stage('ExecuteSOnarQubeReport'){ -sh "mvn sonar:sonar" -} - -stage('UploadArtifactsIntoNexusRepo'){ -sh "mvn deploy" -} - -stage('DeployAppintoTomcatServer'){ -sshagent(['dd147e39-1f55-4554-9700-b10dc494211f']) { - sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@13.233.201.155:/opt/apache-tomcat-9.0.54/webapps/" -} -} - -stage('SendEmailNotification'){ - -mail bcc: '', body: '''Build Over.. - -Regards, -Mithun Software Solutions, -9980923226''', cc: 'devopstrainingblr@gmail.com', from: '', replyTo: '', subject: 'Build over!...', to: 'devopstrainingblr@gmail.com' -} - -*/ - -} diff --git a/JenkinsfileSepBatch2022 b/JenkinsfileSepBatch2022 deleted file mode 100644 index 40fffe89a3..0000000000 --- a/JenkinsfileSepBatch2022 +++ /dev/null @@ -1,75 +0,0 @@ -node{ - -def mavenHome = tool name: "maven3.8.5" - -echo "Build number: ${env.BUILD_NUMBER}" -//echo "Job name is: ${env.JOB_NAME}" -echo "Node name is: ${env.NODE_NAME}" - - -properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')), [$class: 'JobLocalConfiguration', changeReasonComment: ''], pipelineTriggers([pollSCM('* * * * *')])]) - -try{ -sendslacknotifications("STARTED") -stage('CheckoutCode'){ -git branch: 'development', credentialsId: 'd282f55b-fad5-4318-87d4-7ae8a1bf92b2', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' -} - -stage('Build'){ -sh "${mavenHome}/bin/mvn clean package" -} - - /* -stage('ExecuteSonarQubeReport'){ -sh "${mavenHome}/bin/mvn sonar:sonar" -} - -stage('UploadArtifactintoNexus') -{ -sh "${mavenHome}/bin/mvn deploy" -} - -stage('DeployAppIntoTomcatServer'){ -sshagent(['edb68cd9-21f4-4bb5-a6ae-2bd936f65b53']) { - sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@172.31.16.144:/opt/apache-tomcat-9.0.68/webapps/" -} -} -*/ -}//try closing -catch(e){ -currentBuild.result = "FAILURE" -}//catch block closing -finally{ -sendslacknotifications(currentBuild.result) -}//finally closing - -}//node closing - - -def sendslacknotifications(String buildStatus = 'STARTED') { - // build status of null means successful - buildStatus = buildStatus ?: 'SUCCESSFUL' - - // Default values - def colorName = 'RED' - def colorCode = '#FF0000' - def subject = "${buildStatus}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'" - def summary = "${subject} (${env.BUILD_URL})" - - // Override default values based on build status - if (buildStatus == 'STARTED') { - colorName = 'YELLOW' - colorCode = '#FFFF00' - } else if (buildStatus == 'SUCCESSFUL') { - colorName = 'GREEN' - colorCode = '#00FF00' - } else { - colorName = 'RED' - colorCode = '#FF0000' - } - - // Send notifications - slackSend (color: colorCode, message: summary, channel: "#walmart") -} - - diff --git a/Jenkinsparalleljob b/Jenkinsparalleljob deleted file mode 100644 index 9277f18e6f..0000000000 --- a/Jenkinsparalleljob +++ /dev/null @@ -1,39 +0,0 @@ -pipeline{ - - agent any - - tools{ - maven 'maven3.8.5' - } - -stages{ -//Get the code from GitHub - stage('CheckoutCode'){ - steps{ - - git branch: 'master', credentialsId: '4368c281-f352-4495-89c1-730c9742fca9', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' - } - } - - //Run Junt Test cases & Do the Build - - stage('RunUnitTestcases&Build'){ - steps{ - parallel( - RunUnitTestCases: { - sh "mvn test" - }, - - Build: { - sh "mvn clean package" - } - - ) - } - } - - - -}// Stages Closing - -}// Pipelien CLosing diff --git a/Jenkinspipeline b/Jenkinspipeline deleted file mode 100644 index 80cb19bba0..0000000000 --- a/Jenkinspipeline +++ /dev/null @@ -1,38 +0,0 @@ -node{ - -def mavenHome = tool name: "maven3.8.6" - -echo "Jenkins url is: ${env.JENKINS_URL}" -echo "Node Name is: ${env.NODE_NAME}" -echo "Job Name is: ${env.JOB_NAME}" - - - - -properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')), [$class: 'JobLocalConfiguration', changeReasonComment: ''], pipelineTriggers([pollSCM('* * * * *')])]) - - - -stage('CheckOutCode'){ -git branch: 'development', credentialsId: '166c70a2-1df5-4993-a566-0a795862da8c', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' -} - -stage('Build'){ -sh "${mavenHome}/bin/mvn clean package" -} - -stage('ExecuteSonarQubeReport'){ -sh "${mavenHome}/bin/mvn clean sonar:sonar" -} - -stage('UploadArtifcatsIntoArtifactoryRepo'){ -sh "${mavenHome}/bin/mvn clean deploy" -} - -stage('DeployAppIntoTomcatServer'){ -sshagent(['dc292b7a-3b39-4630-9fc3-1b806b54412c']) { - sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@172.31.7.80:/opt/apache-tomcat-9.0.65/webapps/" -} -} - -} diff --git a/JenkinswithAnsible b/JenkinswithAnsible deleted file mode 100644 index 0161f77d76..0000000000 --- a/JenkinswithAnsible +++ /dev/null @@ -1,49 +0,0 @@ -pipeline{ - -agent { -label 'ansible' -} - -environment { - AWS_EC2_PRIVATE_KEY=credentials('ec2-private-key') - } - -tools{ -maven 'maven3.8.2' - -} - - -options{ -timestamps() -buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5')) -} - -stages{ - - stage('CheckOutCode'){ - steps{ - git branch: 'master', credentialsId: '957b543e-6f77-4cef-9aec-82e9b0230975', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' - - } - } - - stage('Build'){ - steps{ - sh "mvn clean package" - } - } - -stage('DeployApp'){ - steps{ - //List the dymaic inventory just for verification - sh "ansible-inventory --graph -i aws_ec2.yaml" - //Run playbook using dynamic inventory & limit exuection only fo tomcatservers. - sh "ansible-playbook -i aws_ec2.yaml appdeploy.yaml -u ec2-user --private-key=$AWS_EC2_PRIVATE_KEY --limit tomcatservers --ssh-common-args='-o StrictHostKeyChecking=no'" - } -} - - -}//Stages Closing - -} From 41e0b791c5d98737e847bd97e0ee1c4956ad982a Mon Sep 17 00:00:00 2001 From: ashwininayak123 <116874372+ashwininayak123@users.noreply.github.com> Date: Mon, 1 Apr 2024 14:08:22 +0530 Subject: [PATCH 3/9] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1f0ca1f937..da121d57a4 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,7 +1,7 @@ # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -name: Java CI with Maven +name: Java CI with Mavn on: push: From 839ec94edad2c89a4903e64e5db74122203808fa Mon Sep 17 00:00:00 2001 From: ashwininayak123 <116874372+ashwininayak123@users.noreply.github.com> Date: Mon, 1 Apr 2024 14:56:23 +0530 Subject: [PATCH 4/9] Update appdeploy.yaml --- appdeploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appdeploy.yaml b/appdeploy.yaml index e8e3a42f8b..712dc9b29e 100644 --- a/appdeploy.yaml +++ b/appdeploy.yaml @@ -28,5 +28,5 @@ - name: Confirm that 200 OK response is returned uri: url: "http://{{ ansible_host }}:8080/maven-web-application/" - status_code: 200 + status_code: 200 ... From fb72c40dd60f570286f2f87768c21b2d7c6d4087 Mon Sep 17 00:00:00 2001 From: ashwininayak123 <116874372+ashwininayak123@users.noreply.github.com> Date: Mon, 1 Apr 2024 15:53:11 +0530 Subject: [PATCH 5/9] Update appdeploy.yaml --- appdeploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/appdeploy.yaml b/appdeploy.yaml index 712dc9b29e..b7368c760e 100644 --- a/appdeploy.yaml +++ b/appdeploy.yaml @@ -1,4 +1,5 @@ --- + - hosts: all become: true tasks: From 14472fcb01a16bf7889195a38faf3d6949d9769f Mon Sep 17 00:00:00 2001 From: ashwininayak123 <116874372+ashwininayak123@users.noreply.github.com> Date: Mon, 1 Apr 2024 15:57:35 +0530 Subject: [PATCH 6/9] Update appdeploy.yaml --- appdeploy.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/appdeploy.yaml b/appdeploy.yaml index b7368c760e..712dc9b29e 100644 --- a/appdeploy.yaml +++ b/appdeploy.yaml @@ -1,5 +1,4 @@ --- - - hosts: all become: true tasks: From 31e84eaa2a885eed8cf44fe456c63bcf12323bb0 Mon Sep 17 00:00:00 2001 From: ashwini Date: Sun, 7 Apr 2024 14:45:28 +0530 Subject: [PATCH 7/9] bbranch cghnages --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 6c5aa3ef90..4946fa885a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,3 +9,5 @@ services: - mavenappbridge networks: mavenappbridge: + +Docker \ No newline at end of file From 85c410d29ab1331f209dc83c19c963ce11e662f6 Mon Sep 17 00:00:00 2001 From: ashwini Date: Sun, 7 Apr 2024 14:53:33 +0530 Subject: [PATCH 8/9] kannada file --- Ashwini/kannada | 1 + 1 file changed, 1 insertion(+) create mode 100644 Ashwini/kannada diff --git a/Ashwini/kannada b/Ashwini/kannada new file mode 100644 index 0000000000..16d97b5754 --- /dev/null +++ b/Ashwini/kannada @@ -0,0 +1 @@ +hiii \ No newline at end of file From 80218bf64ccc0a6c5b9e0acf47b3f2ade56f9eaa Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Sat, 28 Dec 2024 07:59:37 +0000 Subject: [PATCH 9/9] mko --- Ashwini/english | 1 + 1 file changed, 1 insertion(+) create mode 100644 Ashwini/english diff --git a/Ashwini/english b/Ashwini/english new file mode 100644 index 0000000000..f8b3f84f9a --- /dev/null +++ b/Ashwini/english @@ -0,0 +1 @@ +english is my fvrt language