Repository navigation
ci: cleanup/re-organisation - #8807
Merged
Merged
Conversation
The Jenkins pipelines were spread over three directories: a Jenkinsfile at the repo root, one under jenkins/, and five under integration-test/ alongside the test scripts. Collect the job definitions under .ci/jenkins/ and the helpers they share with each other in .ci/, next to retry.sh. slack_usernames.yaml moves out of .github/ because only jenkinsHelpers.groovy reads it - nothing in GitHub Actions does. The three job Jenkinsfiles that fetch jenkinsHelpers.groovy from main now fetch slack_usernames.yaml too. It previously sat at a path every branch had, so a build of an older SG_COMMIT found it in the checkout; after the move it would be missing there and the fileExists guard would quietly skip the Slack DM. Scripts that are also meant to be run by hand stay where they are - build.sh, test.sh, integration-test/*.sh and start_cbs.py. integration-build.sh moves because it is Jenkins-only: it rewrites global git config on the agent. The root Jenkinsfile stays put, since multibranch pipelines discover it there. Also widen the shell workflow's path filter from "*.sh" to "**.sh". A path filter's "*" does not cross "/", so changing any of the nine shell scripts outside the repo root - including integration-test/e2e/run_e2e_tests.sh and the service installers - never triggered shellcheck. Updating the Script Path of the six Jenkins jobs is a separate manual step. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Droid finished @bbrks's task —— View job Validation complete (Pass 2). Summary: CI layout changes look consistent, but two correctness issues stand out: the e2e job’s failure post block can throw if helpers were never fetched, and SyncGatewayIntegration can no longer test older SG_COMMITs because the integration-build script moved without a fallback. |
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Five unresolved critical Jenkins pipeline issues block approval.
Pull request overview
Reorganizes shared CI assets and Jenkins job definitions under .ci, updating pipeline references and shell workflow coverage.
Changes:
- Relocates Jenkinsfiles, helpers, Slack mappings, and integration scripts.
- Updates documentation and CI paths.
- Expands nested shell-script detection and adds maintenance jobs.
File summaries
| File | Reviewed changes and findings |
|---|---|
Jenkinsfile |
Loads relocated Jenkins helpers. |
AGENTS.md |
Documents the new CI layout. |
.github/workflows/shell.yml |
Expands nested shell-script matching. |
.ci/slack_usernames.yaml |
Relocated Slack mappings. |
.ci/jenkinsHelpers.groovy |
Updates helper and mapping paths. |
.ci/jenkins/update-git-docs-tag/Jenkinsfile |
Critical (1 vote): Tag deletion and recreation are not atomic. |
.ci/jenkins/TopologyTests/Jenkinsfile |
Critical (3 votes): Older commits may lack the relocated runner and retry dependency. |
.ci/jenkins/SyncGatewayIntegrationWeekly/Jenkinsfile |
Critical (2 votes): Docker Hub tag parsing fails due to JSON whitespace. |
.ci/jenkins/SyncGatewayIntegration/Jenkinsfile |
Critical (3 votes): Older commits may lack the relocated runner and retry dependency. |
.ci/jenkins/MainIntegration/Jenkinsfile |
Critical (3 votes): Older commits may lack the relocated runner and retry dependency. |
.ci/jenkins/integration-build.sh |
Relocated integration test runner. |
.ci/jenkins/e2e/Jenkinsfile |
Updates E2E CI paths. |
Review details
Suppressed comments (3)
.ci/jenkins/MainIntegration/Jenkinsfile:96
- This job checks out
params.SG_COMMIT, which may be a release or older branch that predates the move to.ci/jenkins/integration-build.sh. Only the helper and Slack map are fetched frommain, so the later runner invocation can fail before any tests run; fetch the current runner and its.ci/retry.shdependency here and make them executable, as the E2E job does for its fetched scripts.
.ci/jenkins/SyncGatewayIntegration/Jenkinsfile:153 - This job checks out
params.SG_COMMIT, which may be a release or older branch that predates the move to.ci/jenkins/integration-build.sh. Only the helper and Slack map are fetched frommain, so the later runner invocation can fail before any tests run; fetch the current runner and its.ci/retry.shdependency here and make them executable, as the E2E job does for its fetched scripts.
.ci/jenkins/TopologyTests/Jenkinsfile:120 - This job checks out
params.SG_COMMIT, which may be a release or older branch that predates the move to.ci/jenkins/integration-build.sh. Only the helper and Slack map are fetched frommain, so the later runner invocation can fail before any tests run; fetch the current runner and its.ci/retry.shdependency here and make them executable, as the E2E job does for its fetched scripts.
- Files reviewed: 8/12 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
SG_COMMIT can be an arbitrary branch, and anything predating the move of jenkins-integration-build.sh into .ci/jenkins dies on the missing path before a single test runs. Fetch it from main alongside the helpers, and .ci/retry.sh with it since the script calls that. Doesn't make older branches runnable on its own - main's script also wants start_cbs.py, the integration-test/tools module and the go.mod tool directives, none of which exist on release/4.1.x or earlier. Those need the .ci move backporting. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
torcolvin
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several recent PRs have introduced more scripts, helpers or job definitions, but spread throughout the repo without too much consistency.
This PR attempts to clean that up and organise a little better by nesting underneath
.ciwhere appropriate (dev-time scripts remain in their existing places):.cidirectoryJenkinsfilesinto.ci/jenkins/<job>subdirectoriesJenkinsfileremains - multibranch pipelines discovers it there and is where you'd expect it.githubremains for GitHub Action only jobs/scriptsTODO in Jenkins
mainhas the new layoutJenkinsfilefrommain, so doing this first points them at files that don't exist yet):.ci/jenkins/MainIntegration/Jenkinsfile.ci/jenkins/SyncGatewayIntegration/Jenkinsfile.ci/jenkins/SyncGatewayIntegrationWeekly/Jenkinsfile.ci/jenkins/TopologyTests/Jenkinsfile.ci/jenkins/e2e/Jenkinsfile.ci/jenkins/update-git-docs-tag/JenkinsfileIntegration Tests