Skip to content

Commit 619f0d9

Browse files
committed
Label release images with their version
envoyproxy/envoy sets org.opencontainers.image.version to its Ubuntu release, which envoy-dataplane inherited. Every release image now carries the release tag in that label. Also fix the ate-setup README, which still said release images are not enough for an install. Signed-off-by: Grant McCloskey <[email protected]>
1 parent 2bb6293 commit 619f0d9

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎cmd/ate-setup/README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ ate-setup deploy ate-system \
2626
```
2727

2828
The registry has to hold every image the install deploys. The images a release
29-
publishes to `ghcr.io/agent-substrate/substrate` are not enough on their own;
30-
see [`docs/dev/releasing.md`](../../docs/dev/releasing.md#release-images). An
29+
publishes to `ghcr.io/agent-substrate/substrate` leave out the demos and the
30+
benchmarking fakes; see
31+
[`docs/dev/releasing.md`](../../docs/dev/releasing.md#release-images). An
3132
install that needs an image the registry lacks fails naming it.
3233

3334
Nothing is built and no registry is pushed to; the manifests still come from

‎cmd/ate-setup/internal/images/release.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ const SourceURL = "https://github.com/agent-substrate/substrate"
4242
// from.
4343
const RevisionLabel = "org.opencontainers.image.revision"
4444

45+
// VersionLabel is the OCI image label naming the release an image belongs to.
46+
// It replaces any value inherited from a base image, such as the Ubuntu
47+
// release envoyproxy/envoy carries.
48+
const VersionLabel = "org.opencontainers.image.version"
49+
4550
// releaseTag matches a release tag, vMAJOR.MINOR.PATCH, or a release candidate,
4651
// vMAJOR.MINOR.PATCH-PRERELEASE. hack/release/draft-release.sh accepts the same.
4752
var releaseTag = regexp.MustCompile(`^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$`)

‎cmd/ate-setup/internal/steps/publish.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ func (e *Env) PublishReleaseImages(ctx context.Context, w io.Writer, opts Publis
236236
labels := []string{
237237
images.SourceLabel + "=" + images.SourceURL,
238238
images.RevisionLabel + "=" + revision,
239+
images.VersionLabel + "=" + tag,
239240
}
240241
// The Dockerfile images are slower to build and likelier to fail, so they
241242
// go first: a failure there publishes nothing under the tag. They ignore

0 commit comments

Comments
 (0)