Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

LPI Exam 701-100 Topic 8 Question 42 Discussion

Actual exam question for LPI's 701-100 exam
Question #: 42
Topic #: 8
[All 701-100 Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: E

Contribute your Thoughts:

Deandrea
2 days ago
I was tempted to go with option B, but that's more of a shell variable syntax. The Jenkins pipeline syntax uses the params object, so D is the way to go.
upvoted 0 times
...
Asuncion
10 days ago
I think option D is correct, as it uses the params object to access the TargetEnvironment parameter.
upvoted 0 times
...
Erinn
15 days ago
I'm not sure, but I think it might be E) $ENV{TargetEnvironment}
upvoted 0 times
...
Shawnee
16 days ago
I agree with Raina, D) ${params.TargetEnvironment} makes sense because it references the parameter value
upvoted 0 times
...
Raina
22 days ago
I think the correct answer is D) ${params.TargetEnvironment}
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77