Which of the following are true when using environment directives In a Declarative Pipelined?

Posted by: Pdfprep Category: CCJE Tags: , ,

Which of the following are true when using environment directives In a Declarative Pipelined?
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 she! Interpreter on the agent dereferences the variable.
B . 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.
C . 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.
D . A Declarative Pipeline can use environment variables defined in Jenkins itself (such as BUIL
E . NUMBER and JENKINS_URL), environment variables defined in an installed plugin (such as GIT_COMMIT or GI
F . BRANCH, defined m the Git plugin), or environment variables that are coded as directives In the Pipeline Itself: the semantics are identical for all environment variables.

Answer: A,C,D

Leave a Reply

Your email address will not be published.