From 072ff4960a56c698e75f4802c7829dbcbd52e875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E6=8C=AF=E5=AE=87?= <> Date: Mon, 20 Jan 2025 10:48:52 +0800 Subject: [PATCH] refactor(EnvironmentVars): log SERVICE_NAME during variable injection for debugging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 孙振宇 <> --- .../src/com/freeleaps/devops/EnvironmentVars.groovy | 1 + first-class-pipeline/vars/pipelineCall.groovy | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/first-class-pipeline/src/com/freeleaps/devops/EnvironmentVars.groovy b/first-class-pipeline/src/com/freeleaps/devops/EnvironmentVars.groovy index 45af367d..be0323e6 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/EnvironmentVars.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/EnvironmentVars.groovy @@ -11,6 +11,7 @@ class EnvironmentVars { def injectVars(Map configurations) { steps.env.SERVICE_NAME = "${configurations.SERVICE_NAME}" + echo "SERVICE_NAME: ${steps.env.SERVICE_NAME}" if (steps.env.SERVICE_NAME == null || steps.env.SERVICE_NAME.isEmpty()) { steps.error("SERVICE_NAME is required") } diff --git a/first-class-pipeline/vars/pipelineCall.groovy b/first-class-pipeline/vars/pipelineCall.groovy index 99cad383..21f252a1 100644 --- a/first-class-pipeline/vars/pipelineCall.groovy +++ b/first-class-pipeline/vars/pipelineCall.groovy @@ -5,7 +5,6 @@ import com.freeleaps.devops.SourceFetcher def call(Map configurations) { def environmentVars = new EnvironmentVars(this) - environmentVars.injectVars(configurations) pipeline { agent any