From 40a7e82de4b2a3d69cb489a03cfaa29af14c2d4d Mon Sep 17 00:00:00 2001 From: Yathishnagaraj <91874668+Yathishnagaraj@users.noreply.github.com> Date: Fri, 2 May 2025 20:18:19 +0530 Subject: [PATCH 1/2] co1 --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 72ba80b..0d1578c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,14 +3,14 @@ pipeline { stages{ stage('git cloned'){ steps{ - git url:'https://github.com/akshu20791/php-project/', branch: "master" + git url:'https://github.com/Yathishnagaraj/php-project/', branch: "master" } } stage('Build docker image'){ steps{ script{ - sh 'docker build -t akshu20791/akshatnewimg6july:v1 .' + sh 'docker build -t yathishnag/akshatnewimg6july:v1 .' sh 'docker images' } } @@ -19,7 +19,7 @@ pipeline { steps { withCredentials([usernamePassword(credentialsId: 'dockerhub-pwd', passwordVariable: 'PASS', usernameVariable: 'USER')]) { sh "echo $PASS | docker login -u $USER --password-stdin" - sh 'docker push akshu20791/akshatnewimg6july:v1' + sh 'docker push yathishnag/akshatnewimg6july:v1' } } } From 8865c065f1ad9b9edbd81b15bf1864188939b6a7 Mon Sep 17 00:00:00 2001 From: Yathishnagaraj <91874668+Yathishnagaraj@users.noreply.github.com> Date: Fri, 2 May 2025 20:32:21 +0530 Subject: [PATCH 2/2] co2 --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0d1578c..764f2f2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,12 +28,12 @@ pipeline { steps { script { def dockerrm = 'sudo docker rm -f My-first-containe2211 || true' - def dockerCmd = 'sudo docker run -itd --name My-first-containe2211 -p 8083:80 akshu20791/akshatnewimg6july:v1' + def dockerCmd = 'sudo docker run -itd --name My-first-containe2211 -p 8083:80 yathishnag/akshatnewimg6july:v1' sshagent(['sshkeypair']) { //chnage the private ip in below code // sh "docker run -itd --name My-first-containe2111 -p 8083:80 akshu20791/2febimg:v1" - sh "ssh -o StrictHostKeyChecking=no ubuntu@172.31.17.188 ${dockerrm}" - sh "ssh -o StrictHostKeyChecking=no ubuntu@172.31.17.188 ${dockerCmd}" + sh "ssh -o StrictHostKeyChecking=no ubuntu@172.31.23.205 ${dockerrm}" + sh "ssh -o StrictHostKeyChecking=no ubuntu@172.31.23.205 ${dockerCmd}" } } }