exam questions

Exam 701-100 All Questions

View all questions & answers for the 701-100 exam

Exam 701-100 topic 1 question 4 discussion

Actual exam question from LPI's 701-100
Question #: 4
Topic #: 1
[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?

  • A. {{TargetEnvironment}}
  • B. $TargetEnvironment
  • C. %TargetEnvironment%
  • D. ${params.TargetEnvironment}
  • E. $ENV{TargetEnvironment}
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
hmagroun
Highly Voted 2 years, 3 months ago
"D" see: https://jenkins.io/doc/book/pipeline/jenkinsfile/#handling-parameters
upvoted 9 times
...
wo7and
Most Recent 4 months, 1 week ago
Selected Answer: D
D is correct answer, the question is about declarative pipeline, which written in Groovy. Correct way to call a parameter is ${params.<param_name>}
upvoted 3 times
...
drinkwater
1 year ago
D is the right answer
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago