From 4813154fb73abf8e116371f3e3c2c8f82b64ad3d Mon Sep 17 00:00:00 2001 From: Ajayab05 <53139108+Ajayab05@users.noreply.github.com> Date: Sat, 18 Mar 2023 13:21:06 +0530 Subject: [PATCH] Delete Jenkinsfile --- Jenkinsfile | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 18323d61703..00000000000 --- a/Jenkinsfile +++ /dev/null @@ -1,41 +0,0 @@ -node{ - stage('SCM Checkout'){ - git 'https://github.com/damodaranj/my-app.git' - } - stage('maven-buildstage'){ - - def mvnHome = tool name: 'maven3', type: 'maven' - sh "${mvnHome}/bin/mvn clean package" - sh 'mv target/myweb*.war target/newapp.war' - } - stage('SonarQube Analysis') { - def mvnHome = tool name: 'maven3', type: 'maven' - withSonarQubeEnv('sonar') { - sh "${mvnHome}/bin/mvn sonar:sonar" - } - } - stage('Build Docker Image'){ - sh 'docker build -t saidamo/myweb:0.0.2 .' - } - stage('Docker Image Push'){ - withCredentials([string(credentialsId: 'dockerPass', variable: 'dockerPassword')]) { - sh "docker login -u saidamo -p ${dockerPassword}" - } - sh 'docker push saidamo/myweb:0.0.2' - } - stage('Nexus Image Push'){ - sh "docker login -u admin -p admin123 3.110.193.37:8083" - sh "docker tag saidamo/myweb:0.0.2 3.110.193.37:8083/damo:1.0.0" - sh 'docker push 3.110.193.37:8083/damo:1.0.0' - } - - stage('Remove Previous Container'){ - try{ - sh 'docker rm -f tomcattest' - }catch(error){ - // do nothing if there is an exception - } - stage('Docker deployment'){ - sh 'docker run -d -p 8090:8080 --name tomcattest saidamo/myweb:0.0.2' - } -}