From 7352b9d4d0ec4c9f193bf813d6879a8a4692dfe7 Mon Sep 17 00:00:00 2001 From: oasis Date: Tue, 20 Jan 2026 06:12:10 +0000 Subject: [PATCH] =?UTF-8?q?perf:=E9=80=9A=E8=BF=87jenkins=E9=83=A8?= =?UTF-8?q?=E7=BD=B2resume=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 15fea72..e853718 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -88,5 +88,34 @@ spec: } } } - } + + + stage('deploy at home') { + agent { + label 'prod && home' + } + steps { + withCredentials([ + usernamePassword( + credentialsId: 'harbor-credentials', + usernameVariable: 'HARBOR_USERNAME', + passwordVariable: 'HARBOR_PASSWORD' + ) + ]) { + sh """ + docker login -u "\$HARBOR_USERNAME" -p "\$HARBOR_PASSWORD" https://harbor.ingress.lab.gitfitlive.com + """ + } + echo "Pulling the docker image..." + sh """ + docker pull $CONTAINER_NAME + """ + echo "Pulling the docker image complete." + echo "starting the docker image ..." + sh """ + docker run -itd -p 8080:80 -n resume $CONTAINER_NAME + """ + echo "starting the docker image complete." + } + } } \ No newline at end of file