From eebe99956a6085c77f9250ed7e58fb745f0bcfcf Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Wed, 11 Nov 2026 04:40:31 -0600 Subject: [PATCH 1/2] ci: Skip the smoke test on branches which only change Markdown files Builds on main always run it. The step is defined twice, because if_changed compares against the default branch, and finds no changes in a build of main. Amp-Thread-ID: https://ampcode.com/threads/T-01a1c7a5-6b65-723b-980c-b85e1e9008b5 Co-authored-by: Amp --- .buildkite/pipeline.yaml | 13 ++++++++++++- AGENTS.md | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index efa4e4125..e59e00880 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -12,10 +12,21 @@ steps: command: .buildkite/prettier-check.sh agents: { queue: "vagrant" } - - label: ":rice: docker-compose-test" + # Builds on main always run the smoke test. if_changed compares against origin/main, + # so it finds no changes in a commit which is already on main, unless it is the newest + - &smoke_test + label: ":rice: docker-compose-test" command: .buildkite/vagrant-run.sh docker-test artifact_paths: ./*.log agents: { queue: "vagrant" } + if: build.branch == "main" + + # Builds on other branches skip the smoke test if they only change docs + - <<: *smoke_test + if: build.branch != "main" + if_changed: + include: "**" + exclude: "**.md" # Please keep in mind that the release manifest uses specific branch names when creating releases. # Therefore, if you update them, or if you decide to change how we detect what kind of build we're dealing diff --git a/AGENTS.md b/AGENTS.md index c2db844db..f828254c9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,6 +24,7 @@ CI runs these on every branch. `.tool-versions` pins Node and the GitHub CLI; CI - `test/smoke-test.sh` starts the base file, and compares the number of running containers with `expect_containers`. Update that number in the same pull request that adds or removes a service. - CI does not run `test/executor-smoke-test.sh`. Run it against a running deployment when you change `docker-compose/executors/`. +- A branch which only changes Markdown files skips the step. Builds on `main` always run it. - The VM image is built from `gcp/images/e2e` in sourcegraph/infrastructure. ## Conventions From eb9ab2063bccd07f51ed60a35c07fa097a97e057 Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Fri, 13 Nov 2026 01:29:15 -0600 Subject: [PATCH 2/2] ci: Skip the smoke test on branches which only change files it does not read Widens the if_changed exclude list from Markdown to the files the smoke test never reads: GitHub and editor settings, release manifests, Prettier inputs, the Compose files it does not start, and the Caddyfiles the base file leaves commented out. New files still run the smoke test. The executor and Jaeger Compose files and test/executor-smoke-test.sh stay off the list, because #1489 adds them to the smoke test. Co-authored-by: Amp Amp-Thread-ID: https://ampcode.com/threads/T-01a1d3ba-ceb2-7220-8dc4-46d20882d955 --- .buildkite/pipeline.yaml | 26 ++++++++++++++++++++++++-- AGENTS.md | 2 +- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index e59e00880..8b2c1608a 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -21,12 +21,34 @@ steps: agents: { queue: "vagrant" } if: build.branch == "main" - # Builds on other branches skip the smoke test if they only change docs + # Builds on other branches skip the smoke test if they only change files it does not read. + # New files run it, until someone adds them here - <<: *smoke_test if: build.branch != "main" if_changed: include: "**" - exclude: "**.md" + exclude: + # Docs, including the PR template and READMEs in mounted directories + - "**.md" + # GitHub Actions, editor and repository settings + - ".github/**" + - ".vscode/**" + - ".gitignore" + - "renovate.json" + # Release manifests + - "release.yaml" + - "batch-change/**" + # Prettier inputs, which the :lipstick: step checks + - ".prettierignore" + - "prettier.config.js" + - "package.json" + - "package-lock.json" + # Compose files the smoke test does not start + - "docker-compose/db-only-migrate.docker-compose.yaml" + - "docker-compose/dev/**" + - "docker-compose/examples/**" + # Caddyfiles the base file leaves commented out + - "caddy/builtins/https.*" # Please keep in mind that the release manifest uses specific branch names when creating releases. # Therefore, if you update them, or if you decide to change how we detect what kind of build we're dealing diff --git a/AGENTS.md b/AGENTS.md index f828254c9..9becd1df8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,7 +24,7 @@ CI runs these on every branch. `.tool-versions` pins Node and the GitHub CLI; CI - `test/smoke-test.sh` starts the base file, and compares the number of running containers with `expect_containers`. Update that number in the same pull request that adds or removes a service. - CI does not run `test/executor-smoke-test.sh`. Run it against a running deployment when you change `docker-compose/executors/`. -- A branch which only changes Markdown files skips the step. Builds on `main` always run it. +- A branch which only changes files listed in the step's `if_changed` `exclude` skips the step. Builds on `main` always run it. When the smoke test starts reading a file on that list, remove it from the list. - The VM image is built from `gcp/images/e2e` in sourcegraph/infrastructure. ## Conventions