refactor(EnvironmentVars): log SERVICE_NAME during variable injection for debugging
Signed-off-by: 孙振宇 <>
This commit is contained in:
parent
dee6917fe5
commit
072ff4960a
@ -11,6 +11,7 @@ class EnvironmentVars {
|
|||||||
|
|
||||||
def injectVars(Map configurations) {
|
def injectVars(Map configurations) {
|
||||||
steps.env.SERVICE_NAME = "${configurations.SERVICE_NAME}"
|
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()) {
|
if (steps.env.SERVICE_NAME == null || steps.env.SERVICE_NAME.isEmpty()) {
|
||||||
steps.error("SERVICE_NAME is required")
|
steps.error("SERVICE_NAME is required")
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import com.freeleaps.devops.SourceFetcher
|
|||||||
|
|
||||||
def call(Map configurations) {
|
def call(Map configurations) {
|
||||||
def environmentVars = new EnvironmentVars(this)
|
def environmentVars = new EnvironmentVars(this)
|
||||||
environmentVars.injectVars(configurations)
|
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user