From b29605c062d0d447fa155d652ca82e0d36c0e3c8 Mon Sep 17 00:00:00 2001 From: Kaushik Naveen Shettigar <71179683+coshik@users.noreply.github.com> Date: Sun, 8 Jun 2025 22:14:08 +0530 Subject: [PATCH 1/6] Create Jenkinsfile --- Jenkinsfile | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..2808b63 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,42 @@ +pipeline { + agent any + stages{ + stage('git cloned'){ + steps{ + git url:'https://github.com/coshik/php-project/', branch: "master" + + } + } + stage('Build docker image'){ + steps{ + script{ + sh 'docker build -t coshik/akshatnewimg6july:v1 .' + sh 'docker images' + } + } + } + stage('Docker login') { + steps { + withCredentials([usernamePassword(credentialsId: 'dockerhub-pwd', passwordVariable: 'PASS', usernameVariable: 'USER')]) { + sh "echo $PASS | docker login -u $USER --password-stdin" + sh 'docker push coshik/akshatnewimg6july:v1' + } + } + } + + stage('Deploy') { + 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 coshik/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.13.249 ${dockerrm}" + sh "ssh -o StrictHostKeyChecking=no ubuntu@172.31.13.249 ${dockerCmd}" + } + } + } + } + } +} From ac88e9f27aa06d3a8d5bae26273868c8d881d1d2 Mon Sep 17 00:00:00 2001 From: Kaushik Naveen Shettigar <71179683+coshik@users.noreply.github.com> Date: Sun, 8 Jun 2025 22:27:10 +0530 Subject: [PATCH 2/6] Update Jenkinsfile --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2808b63..32d07a7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { stage('Build docker image'){ steps{ script{ - sh 'docker build -t coshik/akshatnewimg6july:v1 .' + sh 'docker build -t coshik/coshnewimg8july: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 coshik/akshatnewimg6july:v1' + sh 'docker push coshik/coshnewimg8july:v1' } } } @@ -28,7 +28,7 @@ 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 coshik/akshatnewimg6july:v1' + def dockerCmd = 'sudo docker run -itd --name My-first-containe2211 -p 8083:80 coshik/coshnewimg8july:v1' sshagent(['sshkeypair']) { //chnage the private ip in below code // sh "docker run -itd --name My-first-containe2111 -p 8083:80 akshu20791/2febimg:v1" From ff04be4c8e63677a4ce5860366ae0dae259230d1 Mon Sep 17 00:00:00 2001 From: Kaushik Naveen Shettigar <71179683+coshik@users.noreply.github.com> Date: Sun, 8 Jun 2025 22:46:12 +0530 Subject: [PATCH 3/6] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6534375..e198b36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,6 @@ RUN apt update RUN apt install git -y RUN rm -rf /var/lib/apt/lists/* RUN rm -rf /usr/local/apache2/htdocs/* -RUN git clone https://github.com/akshu20791/apachewebsite/ /usr/local/apache2/htdocs/ +RUN git clone https://github.com/coshik/apachewebsite/ /usr/local/apache2/htdocs/ EXPOSE 80 CMD ["httpd-foreground"] From 49b1123ce2f6376da41b383d5d62f3c2edd77fd5 Mon Sep 17 00:00:00 2001 From: Kaushik Naveen Shettigar <71179683+coshik@users.noreply.github.com> Date: Sun, 8 Jun 2025 22:48:47 +0530 Subject: [PATCH 4/6] Update Jenkinsfile --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 32d07a7..2808b63 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { stage('Build docker image'){ steps{ script{ - sh 'docker build -t coshik/coshnewimg8july:v1 .' + sh 'docker build -t coshik/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 coshik/coshnewimg8july:v1' + sh 'docker push coshik/akshatnewimg6july:v1' } } } @@ -28,7 +28,7 @@ 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 coshik/coshnewimg8july:v1' + def dockerCmd = 'sudo docker run -itd --name My-first-containe2211 -p 8083:80 coshik/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" From 56f127e9ffd4a1bb53b10537a9f543588f09b5ac Mon Sep 17 00:00:00 2001 From: Kaushik Naveen Shettigar <71179683+coshik@users.noreply.github.com> Date: Mon, 9 Jun 2025 02:19:32 +0530 Subject: [PATCH 5/6] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2808b63..91d9c09 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,7 +3,7 @@ pipeline { stages{ stage('git cloned'){ steps{ - git url:'https://github.com/coshik/php-project/', branch: "master" + git url:'https://github.com/coshik/apachewebsite/', branch: "master" } } From 8d184cf288b24704e0a27c44ae483fc057ddf94c Mon Sep 17 00:00:00 2001 From: cosh Date: Wed, 18 Jun 2025 20:50:14 +0530 Subject: [PATCH 6/6] changed the html file --- index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 16c6d71..bd6abdb 100644 --- a/index.html +++ b/index.html @@ -454,10 +454,10 @@

Request a call back

Follow Us

@@ -467,7 +467,7 @@

Follow Us

-

Copyright 2019 All Right Reserved By Free html Templates

+

Copyright 2025 All Right Reserved By Your Mom