0
0
Jenkinsdevops~10 mins

Job configuration sections in Jenkins - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define the section for build steps in a Jenkins job configuration.

Jenkins
<builders>[1]</builders>
Drag options to blanks, or click blank then click option'
A<actions>
B<buildSteps>
C<steps>
D<build>
Attempts:
3 left
💡 Hint
Common Mistakes
Using which is not a valid Jenkins XML tag.
Using which is unrelated to build steps.
2fill in blank
medium

Complete the code to specify the triggers section in a Jenkins job configuration.

Jenkins
<triggers>[1]</triggers>
Drag options to blanks, or click blank then click option'
A<schedule>
B<hudson.triggers.TimerTrigger>
C<pollSCM>
D<cron>
Attempts:
3 left
💡 Hint
Common Mistakes
Using which is a schedule format but not the XML tag.
Using which is a different trigger type.
3fill in blank
hard

Fix the error in the post-build actions section by completing the missing tag.

Jenkins
<publishers>[1]</publishers>
Drag options to blanks, or click blank then click option'
A<hudson.tasks.ArtifactArchiver>
B<actions>
C<postBuildActions>
D<postActions>
Attempts:
3 left
💡 Hint
Common Mistakes
Using generic tags like which are not specific post-build action tags.
Using which is not a valid Jenkins XML tag.
4fill in blank
hard

Fill both blanks to complete the environment variables section in Jenkins job configuration.

Jenkins
<properties>[1][2]</properties>
Drag options to blanks, or click blank then click option'
A<EnvInjectJobProperty>
B<ParametersDefinitionProperty>
C<info>
D<environment>
Attempts:
3 left
💡 Hint
Common Mistakes
Using which is for build parameters, not environment variables.
Using which is not related to environment variables.
5fill in blank
hard

Fill all three blanks to complete the Jenkins job configuration snippet for SCM, triggers, and builders sections.

Jenkins
<scm class="[1]">[2]</scm>
<triggers>[3]</triggers>
<builders>
  <hudson.tasks.Shell>
    <command>echo Hello</command>
  </hudson.tasks.Shell>
</builders>
Drag options to blanks, or click blank then click option'
Ahudson.plugins.git.GitSCM
B<branches><hudson.plugins.git.BranchSpec><name>*/main</name></hudson.plugins.git.BranchSpec></branches>
C<hudson.triggers.TimerTrigger><spec>H/15 * * * *</spec></hudson.triggers.TimerTrigger>
D<hudson.tasks.BatchFile>
Attempts:
3 left
💡 Hint
Common Mistakes
Using inside SCM or triggers sections.
Incorrect branch specification tags.