0
0
Jenkinsdevops~10 mins

Build triggers (poll SCM, webhook, timer) 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 enable polling the SCM every 15 minutes.

Jenkins
triggers {
  pollSCM('[1]')
}
Drag options to blanks, or click blank then click option'
AH/5 * * * *
BH/15 * * * *
CH/30 * * * *
DH/60 * * * *
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'H/5' polls every 5 minutes, which is too frequent.
Using 'H/60' polls only once per hour.
2fill in blank
medium

Complete the code to trigger a build when a webhook is received.

Jenkins
triggers {
  [1]()
}
Drag options to blanks, or click blank then click option'
AgithubPush
BpollSCM
Ctimer
Dcron
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pollSCM' triggers polling, not webhook.
Using 'timer' or 'cron' triggers time-based builds.
3fill in blank
hard

Fix the error in the timer trigger syntax to run every day at midnight.

Jenkins
triggers {
  timer('[1]')
}
Drag options to blanks, or click blank then click option'
A0 0 0 * *
B0 24 * * *
C24 0 * * *
D0 0 * * *
Attempts:
3 left
💡 Hint
Common Mistakes
Using '0 24 * * *' is invalid because hour 24 does not exist.
Using '24 0 * * *' swaps hour and minute.
4fill in blank
hard

Fill both blanks to set up polling every 10 minutes and a timer at 2 AM daily.

Jenkins
triggers {
  pollSCM('[1]')
  timer('[2]')
}
Drag options to blanks, or click blank then click option'
AH/10 * * * *
B0 2 * * *
CH/15 * * * *
D0 0 * * *
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the cron fields or using wrong hour values.
5fill in blank
hard

Fill all three blanks to configure polling every 5 minutes, webhook trigger, and timer at 11 PM.

Jenkins
triggers {
  pollSCM('[1]')
  [2]()
  timer('[3]')
}
Drag options to blanks, or click blank then click option'
AH/5 * * * *
BgithubPush
C0 23 * * *
DpollSCM
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing polling and webhook triggers.
Using invalid cron syntax for 11 PM.