Courseiva
mediumMultiple ChoiceObjective-mapped

XK0-006 Practice Question: A development team uses Git for version control…

A development team uses Git for version control and wants to automate the testing of every commit pushed to the repository. They have a Jenkins server running on a Linux machine. The team wants to automatically trigger a Jenkins pipeline job whenever a push is made to the main branch of their Git repository. The Jenkins server is behind a firewall and cannot be accessed from the internet. The Git repository is hosted on a private GitHub repository. Which of the following is the best approach to trigger the Jenkins job automatically?

⚠ Common exam trap

A common mix-up: candidates assume webhooks are always the best automation trigger, but the firewall restriction makes polling the only practical solution when the Jenkins server cannot receive inbound connections.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Configure Jenkins to poll the Git repository every minute for changes.

Jenkins' polling mechanism allows it to periodically check the Git repository for changes, which works even when the Jenkins server is behind a firewall and cannot receive inbound webhooks. Polling every minute provides near-real-time automation without requiring internet access to the Jenkins server, making it the only viable option given the network constraint.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Have developers manually click 'Build Now' in Jenkins after each push.

    Why it's wrong here

    Not automated.

  • Configure Jenkins to poll the Git repository every minute for changes.

    Why this is correct

    Works behind firewall.

  • Configure a GitHub webhook to send a POST request to the Jenkins server.

    Why it's wrong here

    Jenkins is not reachable from internet.

  • Set up a cron job on the Git server to execute a script that triggers Jenkins.

    Why it's wrong here

    Git server is external and not under admin control.

About these practice questions

Courseiva writes every XK0-006 question from scratch — 979 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.