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 Exam CJE Topic 1 Question 88 Discussion

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

You're a DevOps engineer in charge of configuring Jenkins for your team's CI/CD pipeline. You're utilizing the Jenkins pipeline and the Jenkinsfile. You want to define a stage for your build that utilizes the locally installed Ant and build.xml in the root of your project repository. Which is the correct syntax?

Show Suggested Answer Hide Answer
Suggested Answer: C

When a build breaks, fixing it should be the priority of everyone on the project


Contribute your Thoughts:

Hannah
4 days ago
Hmm, I'm not sure. Maybe I should just use the 'ant' command without the build.xml file and see what happens? Yolo!
upvoted 0 times
...
Truman
6 days ago
D) stage('build') { steps { sh 'ant -f build.xml -v' } } is the way to go. Enclosing the Ant command in the steps block is the correct syntax.
upvoted 0 times
...
Grover
10 days ago
B) stage('build') { sh 'ant -f build.xml -v' } looks good to me. It directly specifies the build stage and runs the Ant command on the build.xml file.
upvoted 0 times
...
Mee
20 days ago
Hmm, I see your point. Let's double check the documentation before the exam.
upvoted 0 times
...
Pok
22 days ago
I disagree, I believe it's D) stage('build') { steps { sh 'ant -f build.xml -v' } }
upvoted 0 times
...
Mee
25 days ago
I think the correct syntax is B) stage('build') { sh 'ant -f build.xml -v' }
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