A declarative Jenkins pipeline contains the following excerpt: parameters { string (name: "˜TargetEnvironment', defaultValue: "˜staging', description: "˜Target environment')
}
How can a task use the value provided for TargetEnvironment?
A declarative Jenkins pipeline contains the following excerpt: parameters { string (name: "˜TargetEnvironment', defaultValue: "˜staging', description: "˜Target environment')
}
How can a task use the value provided for TargetEnvironment?
In a Jenkins declarative pipeline, when defining parameters, you access their values using the `params` object. For the given parameter `TargetEnvironment`, the correct way to reference its value in the pipeline is `${params.TargetEnvironment}`.
"D" see: https://jenkins.io/doc/book/pipeline/jenkinsfile/#handling-parameters
D is correct answer, the question is about declarative pipeline, which written in Groovy. Correct way to call a parameter is ${params.<param_name>}
D is the right answer