Skip to content

Commit c34e2b7

Browse files
committed
release: don't ostree commits into release metadata on f43+
Starting in f43, we won't be publishing content to the OSTree repo anymore, so there's no point in having any commit hash in the release metadata. On builds that have `oci-imported: true`, let's stop adding the `commit` key in the release metadata in `cosa generate-release-metadata`. That'll naturally bind it to f43. In plume, handle the case where there is no commit string.
1 parent 62b1787 commit c34e2b7

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

mantle/cmd/plume/release.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,12 @@ func modifyReleaseMetadataIndex(api *aws.API, rel release.Release) {
299299
var commits []release.IndexReleaseCommit
300300
var pullspecs []release.IndexReleaseOciImage
301301
for arch, vals := range rel.Architectures {
302-
commits = append(commits, release.IndexReleaseCommit{
303-
Architecture: arch,
304-
Checksum: vals.Commit,
305-
})
302+
if vals.Commit != "" {
303+
commits = append(commits, release.IndexReleaseCommit{
304+
Architecture: arch,
305+
Checksum: vals.Commit,
306+
})
307+
}
306308
pullspecs = append(pullspecs, release.IndexReleaseOciImage{
307309
Architecture: arch,
308310
ContainerImage: *vals.OciImage,

src/cmd-generate-release-meta

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ def append_build(out, input_):
146146
print(f" {arch} images:")
147147
# build the architectures dict
148148
arch_dict = {"media": {}}
149-
ensure_dup(input_, arch_dict, "ostree-commit", "commit")
149+
if not input_.get('coreos-assembler.oci-imported'):
150+
ensure_dup(input_, arch_dict, "ostree-commit", "commit")
150151

151152
# within the CoreOS pipelines, we always expect base-oscontainer to be set,
152153
# but this script is also currently used by OKD but they only care about

0 commit comments

Comments
 (0)