Skip to content

Commit 2bf6f89

Browse files
bschwedlerianpittwood
authored andcommitted
Document dispatch filters and fix pr workflow exit code
- Update image-version input descriptions to note the automatic v prefix strip. - Fix swallowed exit code in bakery-build-pr.yml (same echo+subshell pattern as the build workflows). - Add image-version and dev-stream to both input tables in CI.md. - Add "Dispatched version doesn't match bakery" to CLAUDE.md CI failure modes.
1 parent 191a177 commit 2bf6f89

5 files changed

Lines changed: 16 additions & 10 deletions

File tree

.github/workflows/bakery-build-native.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ on:
2828
required: false
2929
type: string
3030
image-version:
31-
description: "Filter to a specific image version (e.g. product version from upstream dispatch)"
31+
description: "Filter to a specific image version. A leading 'v' is stripped automatically."
3232
default: ""
3333
required: false
3434
type: string

.github/workflows/bakery-build-pr.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ jobs:
113113
MATRIX_VERSIONS: ${{ inputs.matrix-versions }}
114114
BAKERY_CONTEXT: ${{ inputs.context }}
115115
run: |
116-
echo "versions_matrix=$(bakery ci matrix --quiet --dev-versions "$DEV_VERSIONS" --matrix-versions "$MATRIX_VERSIONS" --exclude platform --context "$BAKERY_CONTEXT" | jq --compact-output .)" >> "$GITHUB_OUTPUT"
116+
result=$(bakery ci matrix --quiet --dev-versions "$DEV_VERSIONS" --matrix-versions "$MATRIX_VERSIONS" --exclude platform --context "$BAKERY_CONTEXT")
117+
echo "versions_matrix=$(echo "$result" | jq --compact-output .)" >> "$GITHUB_OUTPUT"
117118
118119
build-test:
119120
name: "Build/Test ${{ matrix.img.image }}:${{ matrix.img.version }} (${{ matrix.img.platform }})"

.github/workflows/bakery-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ on:
2929
required: false
3030
type: string
3131
image-version:
32-
description: "Filter to a specific image version (e.g. product version from upstream dispatch)"
32+
description: "Filter to a specific image version. A leading 'v' is stripped automatically."
3333
default: ""
3434
required: false
3535
type: string

CI.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,15 @@ jobs:
113113
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event.schedule == '0 4 * * *' }}
114114
```
115115
#### Inputs
116-
| Input | Required | Default | Description |
117-
|----------------|----------|-----------------|----------------------------------------------------------------------------------------------------------------|
118-
| `version` | No | `main` | The version of Posit Bakery to use. Can be a specific version (e.g., `0.1.0`) or a branch name (e.g., `main`). |
119-
| `context` | No | `.` | The path to the Bakery project root. |
120-
| `dev-versions` | No | `include` | Whether to include development versions in the build. Options are `include`, `exclude`, and `only`. |
121-
| `push` | No | `false` | Whether to push built images to the registry. |
122-
| `runs-on` | No | `ubuntu-latest` | The type of runner to use for the build jobs. |
116+
| Input | Required | Default | Description |
117+
|------------------|----------|-----------------|----------------------------------------------------------------------------------------------------------------|
118+
| `version` | No | `main` | The version of Posit Bakery to use. Can be a specific version (e.g., `0.1.0`) or a branch name (e.g., `main`). |
119+
| `context` | No | `.` | The path to the Bakery project root. |
120+
| `dev-versions` | No | `include` | Whether to include development versions in the build. Options are `include`, `exclude`, and `only`. |
121+
| `image-version` | No | (empty) | Filter to a specific image version. A leading `v` is stripped automatically. When set and no version matches, the matrix step fails. |
122+
| `dev-stream` | No | (empty) | Filter dev versions to a specific release stream (e.g. `daily`, `preview`). |
123+
| `push` | No | `false` | Whether to push built images to the registry. |
124+
| `runs-on` | No | `ubuntu-latest` | The type of runner to use for the build jobs. |
123125

124126
#### Workflow Steps
125127

@@ -240,6 +242,8 @@ jobs:
240242
| `version` | No | `main` | The version of Posit Bakery to use. Can be a specific version (e.g., `0.1.0`) or a branch name (e.g., `main`). |
241243
| `context` | No | `.` | The path to the Bakery project root. |
242244
| `dev-versions` | No | `include` | Whether to include development versions in the build. Options are `include`, `exclude`, and `only`. |
245+
| `image-version` | No | (empty) | Filter to a specific image version. A leading `v` is stripped automatically. When set and no version matches, the matrix step fails. |
246+
| `dev-stream` | No | (empty) | Filter dev versions to a specific release stream (e.g. `daily`, `preview`). |
243247
| `push` | No | `false` | Whether to push built images to the registry. |
244248
| `runs-on` | No | `ubuntu-latest` | The type of runner to use for non-build jobs. |
245249
| `amd64-builder` | No | `ubuntu-latest-4x` | The type of runner to use for amd64 build jobs. |

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,3 +220,4 @@ gh run view <run-id> -R posit-dev/images-connect --log-failed
220220
- **Stale UV base image cache** — The Python build stage uses `ghcr.io/astral-sh/uv:debian-slim` as its base image. Docker layer caching may preserve an older UV version that doesn't know about newer Python releases. Even if UV upstream supports a Python version, a cached builder layer may not. Fix: the `clean.yml` workflow removes caches older than 14 days, but you can force a fresh build by clearing the cache registry (`bakery clean cache-registry ghcr.io/posit-dev`).
221221
- **Registry auth failures** — Docker Hub requires `DOCKER_HUB_ACCESS_TOKEN` secret; ECR requires AWS OIDC (`id-token: write` permission + `AWS_ROLE` secret).
222222
- **ARM64 runner unavailable** — Native builds use `ubuntu-24.04-arm64-4-core` runners which may have capacity limits.
223+
- **Dispatched version doesn't match bakery** — Product repos dispatch with raw git-describe versions (e.g. `v2026.03.0-473-g072bb6fd1f`). Bakery normalizes these to semver-with-metadata (e.g. `2026.04.0-dev+473-g072bb6fd1f`). The shared workflows strip a leading `v` automatically, but other format differences (edition, `-dev` qualifier, `+` separator) mean `--image-version` requires the version string bakery knows, not the raw product version. If the matrix is empty after filtering, `bakery ci matrix` exits non-zero.

0 commit comments

Comments
 (0)