City infrastructure lint and test stages for the water-utility repo should live as versioned pipeline code in Jenkins. Where should that definition live?
Select an answer to reveal the explanation.
Short Explanation
You want lint and test stages to travel with the water-utility code, so keep them in a Jenkinsfile checked into the repository. Undocumented desktop clicks, a SCADA-room sticky note, and a wiki page to copy from are not versioned pipeline definitions.
Full Explanation
A Jenkinsfile is Jenkins’s pipeline-as-code definition and belongs in the application repository beside the code it builds. For the water-utility repo, declare lint and test stages there so changes are versioned, reviewable, and reproducible on any Jenkins controller that loads the repo. Checking the definition into Git lets the pipeline travel with the code through pull requests, rollbacks, and audits instead of living only in a person’s head or UI session. Keeping it only as undocumented clicks on one admin’s desktop Jenkins UI fails because those clicks are not versioned with the repo, are hard to review, and may disappear when the admin’s job or machine changes. A sticky note on the SCADA room door listing stage names is not executable, diffable, or enforced by the controller. A shared team wiki page that operators consult and copy from before every Friday build is documentation, not the pipeline definition; manual copying cannot reliably drive automated stages or guarantee that the build uses the reviewed version. Exam caveat: the Jenkinsfile is the definition location; it does not replace credential stores, agent labels, or folder-level Jenkins configuration that remains on the controller. “Pipeline as code” means the stage graph is in source control, not that every Jenkins system setting belongs in the Jenkinsfile. Operational check: open the repository and confirm its Jenkinsfile declares lint and test stages. Change a stage in a pull request, merge it, and verify the next build runs the updated graph. Confirm an auditor can retrieve the historical Jenkinsfile revision matching a past build.