Chapter 23Lesson 05~210 minutes

Checkpoint Lab — Organization Folders, GitHub/GitLab/Bitbucket Discovery, Repository Onboarding, and Platform Automation

Simulate onboarding several repositories, predict exactly which ones are eligible, verify child-item and ownership evidence, constrain filters and credential assumptions, remove one repository, apply deterministic orphan handling, and capture a platform-governance evidence packet before cleanup.

Checkpoint labOnboardingFilteringOrphan policyGovernanceCleanup

Learning objectives

  • Predict repository eligibility and generated child state before the scan.
  • Run a deterministic local provider-discovery simulation and map eligible repositories to Jenkins children.
  • Constrain credential/filter assumptions and low-trust execution defaults.
  • Remove one repository and verify orphan handling without erasing evidence.
  • Produce a complete platform-onboarding evidence packet and bridge to Shared Libraries.

1. Scenario

You operate a Jenkins platform that should onboard only active, Jenkins-enabled repositories owned by approved engineering teams. You must prove why each repository is included or excluded, ensure generated children have no protected credentials by default, and handle repository removal predictably.

2. Baseline assumptions

  • Jenkins 2.568.3 LTS, Java 21.
  • Branch API 2.1280.v0d4e5b_b_460ef, Folders 6.1106.v3a_d9a_6d2465e.
  • Mandatory path: local JSON provider simulation and local bare Git; no real provider credential.
  • Optional provider baselines: GitHub Branch Source 1983.vfa_27ed961853, GitLab Branch Source 743.ve0c8154a_8da_b_, Bitbucket Branch Source 937.3.10.
  • One disposable low-trust agent ch23-lowtrust; built-in node remains at zero executors.

3. Predict before changing anything

Write down two required predictions: (1) which repository IDs should be eligible from the checkpoint inventory; (2) which Jenkins child item should become orphaned after a provider removal. Also predict that no child can access a protected production credential because none is configured in this lab scope.

4. Checkpoint inventory

[
 {"id":201,"name":"orders","owner":"team-commerce","visibility":"public","archived":false,"jenkins":true},
 {"id":202,"name":"pricing","owner":"team-commerce","visibility":"public","archived":false,"jenkins":true},
 {"id":203,"name":"old-checkout","owner":"team-commerce","visibility":"public","archived":true,"jenkins":true},
 {"id":204,"name":"security-private","owner":"team-security","visibility":"private","archived":false,"jenkins":true},
 {"id":205,"name":"website","owner":"marketing","visibility":"public","archived":false,"jenkins":false}
]

Policy: allowed owner is only team-commerce; repository must be public, active and Jenkins-enabled. Therefore only IDs 201 and 202 should be onboarded.

5. Execute the deterministic discovery

Save the inventory to /tmp/ch23-checkpoint/repos.json, run a copy of the Chapter 23 discovery script with allowed={'team-commerce'}, and archive/retain the input and output. Create local bare repositories and disposable Multibranch children ch23-checkpoint/orders and ch23-checkpoint/pricing. Each child uses only ch23-lowtrust and archives its exact source SHA.

6. Verify predictions independently

Prediction Independent verification
Only orders/pricing eligible Compare discovery output with original provider JSON and filter source.
Two child items exist Inspect Jenkins folder item list and child full names.
Each child build is attributable Record build URL/number/cause, source SHA, node and workspace.
No protected secret available Record credential policy; do not create a fake “production” secret just to test masking.

7. Remove one repository

Delete ID 202 from the provider inventory, save a before/after diff, rerun discovery once, and preserve the new output. pricing is now an orphan candidate. Record its last source/build evidence, disable or retain it per the lab retention policy, and only delete it after the evidence packet is complete.

8. Optional real-provider validation

On a disposable provider organization you control, repeat the design with the exact branch-source plugin. Capture the app/token scope, organization/group ID, provider API quota headers, webhook registration, Organization Folder computation log and generated child names. Do not use broad organization-admin credentials or a production organization.

9. Required evidence packet

Evidence Capture
Controller baseline Jenkins/Java + Branch API/Folders/provider plugin versions
Provider identity Mock provider or optional app/token type; intended scope and rotation owner
Inventory Repository IDs, owner, visibility, archive/Jenkins flags
Discovery policy Exact filter source and discovered.tsv before/after change
Organization item Simulation folder or real Organization Folder full name
Generated children Child full names and branch-index evidence
Build provenance Build number/URL/cause, source SHA, agent/workspace
API/webhook Simulation limitation or real response/quota/webhook IDs
Orphan handling Removal evidence, retention decision and final child state
Ownership Repository owner/team and escalation contact/policy note

10. Cleanup and rollback

Remove only the disposable checkpoint folder, synthetic repositories, local provider files and lab agent created for this chapter. If you used an optional real provider, remove only the test webhook/app installation/credential after preserving its audit evidence. Never delete organization-wide hooks or credentials by pattern.

11. What Chapter 23 adds to the production operating model

Jenkins onboarding is now an explicit platform lifecycle: provider identity and API budget → repository discovery and ownership → generated child items → branch builds → webhook/status evidence → deterministic orphan retention. The next chapter moves from onboarding many repositories to reusing reviewed Pipeline behavior safely through Shared Libraries, versioned library code, resources and testing.

Next chapter

Shared Libraries, Global Variables, vars, src, resources, Versioning, Testing, and Pipeline Product Design

Turn repeated Pipeline logic into reviewed, versioned products without silently widening trust or losing source/library provenance.

Knowledge check

Answer before revealing the explanation.

1. What should you predict before the checkpoint scan?

2. What makes the checkpoint deterministic?

3. What evidence proves least privilege in the simulation?

4. How should a production platform react to API throttling?

5. What does Chapter 23 add to the Jenkins operating model?

Official references and version notes

Version note — 2026-09-17: mandatory exercises are a local faithful simulation and require no external SCM account. The optional real-provider path must re-check the exact provider plugin version, security advisories, API permissions, webhook behavior, rate-limit headers and provider-plan limits before use. Never substitute a broad personal/admin token merely to make discovery easier.

Keep the academy open

Support free, practical DevOps education.

Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.

Ethereum / ERC-20
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0Send only Ethereum/ERC-20 compatible assets to this address.