From 42f46a5d069d2f4a3638d1983fe97ad09354c58b Mon Sep 17 00:00:00 2001 From: Duvan Rondon Date: Mon, 24 Feb 2025 15:43:43 -0500 Subject: [PATCH] Fixed service-api-gateway add env Server port --- Jenkinsfile copy | 6 +++--- service-api-gateway.yml | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile copy b/Jenkinsfile copy index 8bc8702..180e52e 100644 --- a/Jenkinsfile copy +++ b/Jenkinsfile copy @@ -51,13 +51,13 @@ pipeline { def outputSpring = sh(script: "gcloud run services replace service-spring.yml --platform=managed --region=${REGION} 2>&1", returnStdout: true).trim() def cloudRunUrlMatchNest = outputNest =~ /URL:\s+(https:\/\/[^\s]+)/ - def cloudRunUrlMatchSpring = outputSpring =~ /URL:\s+(https:\/\/[^\s]+)/ + def cloudRunUrlMatchLotes = outputSpring =~ /URL:\s+(https:\/\/[^\s]+)/ if (cloudRunUrlMatchNest) { env.CLOUD_RUN_NEST = cloudRunUrlMatchNest[0][1] } if (cloudRunUrlMatchSpring) { - env.CLOUD_RUN_SPRING = cloudRunUrlMatchSpring[0][1] + env.CLOUD_RUN_LOTES = cloudRunUrlMatchLotes[0][1] } } } @@ -67,7 +67,7 @@ pipeline { steps { sh ''' sed -i "s|SERVICE_NEST_URL|${CLOUD_RUN_NEST}|g" **.yml - sed -i "s|SERVICE_SPRING_URL|${CLOUD_RUN_SPRING}|g" **.yml + sed -i "s|SERVICE_LOTES_URL|${CLOUD_RUN_LOTES}|g" **.yml cat service-api-gateway.yml ''' } diff --git a/service-api-gateway.yml b/service-api-gateway.yml index 9c25465..2165bbd 100644 --- a/service-api-gateway.yml +++ b/service-api-gateway.yml @@ -14,7 +14,7 @@ spec: image: consiti/felsv-spring-cloud-api-gateway:Prueba4 ports: - name: http1 - containerPort: 8440 + containerPort: 8082 resources: limits: cpu: 1000m @@ -24,10 +24,12 @@ spec: periodSeconds: 240 failureThreshold: 1 tcpSocket: - port: 8440 + port: 8082 env: - name: SERVICIO_LOTES value: SERVICE_LOTES_URL - name: SERVICIO_NEST value: SERVICE_NEST_URL + - name: SERVER_PORT + value: '8082'