updated jenkinsfile
Some checks failed
ecommerce frontend/pipeline/head Something is wrong with the build of this commit
ecommerce-backend/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
2026-03-11 05:02:22 +00:00
parent 57a2968d74
commit a3aae7174e

14
Jenkinsfile vendored
View File

@@ -4,15 +4,15 @@ pipeline {
parameters { parameters {
string( string(
name: 'NODE_IP', name: 'NODE_IP',
defaultValue: '192.168.108.200', defaultValue: '192.168.108.102',
description: 'On-premise Kubernetes node IP' description: 'On-premise Kubernetes node IP'
) )
} }
environment { environment {
HARBOR = '192.168.108.200:80' HARBOR = 'harbor.myriadcara.com'
IMAGE = '192.168.108.200:80/vaishnavi-ecommerce/backend' IMAGE = 'harbor.myriadcara.com/vaishnavi-ecommerce/backend'
OLD_IMAGE = '192.168.49.2:30004/vaishnavi-ecommerce/backend:latest' OLD_IMAGE = 'harbor.myriadcara.com/vaishnavi-ecommerce/backend:latest'
TAG = "${env.BUILD_NUMBER}" TAG = "${env.BUILD_NUMBER}"
NAMESPACE = 'ecommerce' NAMESPACE = 'ecommerce'
K8S_DIR = 'k8s/backend' K8S_DIR = 'k8s/backend'
@@ -28,12 +28,12 @@ pipeline {
stage('Push to Harbor') { stage('Push to Harbor') {
steps { steps {
withCredentials([usernamePassword( withCredentials([usernamePassword(
credentialsId: 'harbor-credentials', credentialsId: 'harbor-updated-creds',
usernameVariable: 'HARBOR_USER', usernameVariable: 'HARBOR_USER',
passwordVariable: 'HARBOR_PASS' passwordVariable: 'HARBOR_PASS'
)]) { )]) {
sh """ sh """
echo "\$HARBOR_PASS" | docker login ${HARBOR} -u "\$HARBOR_USER" --password-stdin echo "\$HARBOR_PASS" | docker login http://${HARBOR} -u "\$HARBOR_USER" --password-stdin
docker push ${IMAGE}:${TAG} docker push ${IMAGE}:${TAG}
docker push ${IMAGE}:latest docker push ${IMAGE}:latest
""" """
@@ -127,4 +127,4 @@ pipeline {
} }
} }
} }
} }