added files
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
def call(String description) {
|
||||
// Initialize or increment a global step counter kept in the environment
|
||||
def current = (env.STEP_COUNTER ?: '0').trim()
|
||||
int next
|
||||
try {
|
||||
next = current.toInteger() + 1
|
||||
} catch (Throwable ignored) {
|
||||
next = 1
|
||||
}
|
||||
env.STEP_COUNTER = next.toString()
|
||||
|
||||
// Derive environment name from common env vars
|
||||
def stageEnv = env.cicd_environment ?: env.INFRA_ENV ?: env.BUILD_ENV ?: env.ENVIRONMENT ?: 'ftr'
|
||||
|
||||
return "[${stageEnv}] [Step ${env.STEP_COUNTER}] ${description}"
|
||||
}
|
||||
Reference in New Issue
Block a user