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

12
Jenkinsfile vendored
View File

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