diff --git a/Jenkinsfile b/Jenkinsfile index 72ba80b..764f2f2 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' } } } @@ -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}" } } }