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

CloudBees CJE Exam - Topic 1 Question 40 Discussion

Which of the following are true when using environment directives in a Declarative Pipeline?Choose 3 answers
A) If an environment variable b enclosed In single quotes, the Pipeline DSL dereferences the variable on the master's JVM and passes the calculated string to the sh or bat step; if the environment variable Is enclosed in double quotes, the name of the environment variable itself is passed to the 'sh' or 'bat' step and the shell interpreter on the agent dereferences the variable. and C) A Declarative Pipeline can use environment variables defined In Jenkins Itself (such as BUILD_NUMBER and JENKINS^URL), environment variables defined in an installed plugin (such as GITCOMMIT or GIT .BRANCH, defined in the Git plugin), or environment variables that are coded as directives in the Pipeline itself; the semantics are identical for all environment variables. and D) An environment variable can be specified globally (to apply to all steps in the pipeline), for an individual step, or for one or more specified steps In the Pipeline,
B) If an environment variable Is enclosed In double quotes, the Pipeline DSL dereferences the variable on the master's JVM and passes the calculated string to the sh or bat step; if the environment variable is enclosed in single quotes, the name of the environment variable itself is passed to the 'sh' or 'bat' step and the shell interpreter on the agent dereferences the variable.

CloudBees CJE Exam - Topic 1 Question 40 Discussion

Actual exam question for CloudBees's CJE exam
Question #: 40
Topic #: 1
[All CJE Questions]

Which of the following are true when using environment directives in a Declarative Pipeline?

Choose 3 answers

Show Suggested Answer Hide Answer
Suggested Answer: A, C, D

Contribute your Thoughts:

0/2000 characters
Buck
8 months ago
Wait, are you sure about A? That sounds a bit off to me.
upvoted 0 times
...
Isaiah
9 months ago
D makes sense, I use it all the time for specific steps.
upvoted 0 times
...
Marguerita
9 months ago
C is spot on! Jenkins environment variables are super handy.
upvoted 0 times
...
Alex
9 months ago
I think B is correct too, but I'm not 100% sure.
upvoted 0 times
...
Melinda
9 months ago
A is definitely true, I've seen it in action.
upvoted 0 times
...
Carylon
9 months ago
I recall practicing a question similar to this, and I think option D is definitely true because we can set environment variables globally or for specific steps.
upvoted 0 times
...
Meghan
9 months ago
I'm not so sure about the specifics, but I feel like option C might be right since we talked about using Jenkins environment variables in class.
upvoted 0 times
...
Aide
9 months ago
I think option A is correct because I remember something about single and double quotes having different behaviors in the Pipeline DSL.
upvoted 0 times
...
Lenny
9 months ago
I vaguely recall that option A is incorrect, but I can't remember the exact reason why. I need to double-check the quoting rules.
upvoted 0 times
...
Gwenn
9 months ago
I’m pretty confident that option D is true since we can set environment variables globally or for specific steps, but I’m not entirely sure about the others.
upvoted 0 times
...
Lucia
9 months ago
I feel like I've seen a question about environment variables in Jenkins before, maybe something similar to option C about using built-in variables.
upvoted 0 times
...
Tonette
9 months ago
I think I remember that single quotes and double quotes behave differently, but I'm not sure which way it goes.
upvoted 0 times
...
Marvel
9 months ago
I’m a bit confused about the quotes part; I thought it was the other way around, so I’m leaning towards option B being correct instead of A.
upvoted 0 times
...
Reita
9 months ago
Hmm, I'm a bit unsure about this one. The output from the cluster command is a bit confusing, and I'm not sure which of these options is the correct action to take.
upvoted 0 times
...
Reuben
9 months ago
Hmm, I'm a bit unsure about how to approach this. The dividend and share price are given, but I'm not sure how to incorporate the reinvestment rate and return on reinvested funds.
upvoted 0 times
...

Save Cancel