Skip to content

Commit 5c626a6

Browse files
committed
drop uses of fedora-coreos.stream
Since moving over to building via podman tools the `com.coreos.stream` label is set on any built container images [1]. We've moved zincati over to support the new `com.coreos.stream` label [2]. Let's drop adding the `fedora-coreos.stream` label and annotation to our images, and also change any consumers to use `com.coreos.stream`. [1] https://github.com/coreos/fedora-coreos-config/blob/ac5ba0b5026a74f94515fe1a8454f3c975b39743/Containerfile#L53 [2] coreos/zincati@a142c98
1 parent 89e05a5 commit 5c626a6

5 files changed

Lines changed: 8 additions & 17 deletions

File tree

mantle/cmd/kola/kola.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,9 +567,9 @@ func syncFindParentImageOptions() error {
567567
case "fcos":
568568
var stream string
569569
if kola.CosaBuild.Meta.CosaImportedOciImage {
570-
s, ok := kola.CosaBuild.Meta.OciLabels["fedora-coreos.stream"]
570+
s, ok := kola.CosaBuild.Meta.OciLabels["com.coreos.stream"]
571571
if !ok {
572-
return errors.New("label 'fedora-coreos.stream' not found in build metadata")
572+
return errors.New("label 'com.coreos.stream' not found in build metadata")
573573
}
574574
stream = string(s)
575575
} else {

src/cmd-build-with-buildah

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,6 @@ build_with_buildah() {
175175
--label org.opencontainers.image.source="${source}" \
176176
--label org.opencontainers.image.revision="${commit}"
177177

178-
# XXX: Temporary hack until we have https://github.com/coreos/rpm-ostree/pull/5454
179-
# which would allow us to fold this back into the build process.
180-
# shellcheck source=/dev/null disable=SC2153
181-
stream=$(eval "$(grep 'STREAM=' "src/config/${argsfile}")"; echo "${STREAM}")
182-
if [ -n "${stream}" ]; then
183-
set -- "$@" --label fedora-coreos.stream="$stream" \
184-
--annotation fedora-coreos.stream="$stream"
185-
fi
186-
187178
if [ -d "src/yumrepos" ] && [ -e "src/yumrepos/${variant:-}.repo" ]; then
188179
set -- "$@" --secret id=yumrepos,src="$(realpath "src/yumrepos/$variant.repo")" \
189180
--secret id=contentsets,src="$(realpath src/yumrepos/content_sets.yaml)" \

src/cmd-generate-release-meta

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ def append_build(out, input_):
122122
if args.stream_name:
123123
streamnamesrc = {'branch': args.stream_name}
124124
else:
125-
fcos_stream = input_.get('coreos-assembler.oci-imported-labels', {}).get('fedora-coreos.stream')
126-
if fcos_stream:
127-
streamnamesrc = {'branch': fcos_stream}
125+
coreos_stream = input_.get('coreos-assembler.oci-imported-labels', {}).get('com.coreos.stream')
126+
if coreos_stream:
127+
streamnamesrc = {'branch': coreos_stream}
128128
else:
129129
streamnamesrc = input_.get('coreos-assembler.container-config-git')
130130

src/cmd-import

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ def generate_lockfile_and_commitmeta(tmpd, ostree_commit, build_meta):
144144
'synthetic': True,
145145
}
146146

147-
stream = build_meta.get('coreos-assembler.oci-imported-labels', {}).get('fedora-coreos.stream', '')
147+
stream = build_meta.get('coreos-assembler.oci-imported-labels', {}).get('com.coreos.stream', '')
148148
if stream != '':
149-
commitmeta['fedora-coreos.stream'] = stream
149+
commitmeta['com.coreos.stream'] = stream
150150

151151
with open(tmp_commitmeta, 'w') as f:
152152
json.dump(commitmeta, f, indent=2)

src/cmd-sign

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def robosign_oci(args, s3, build, gpgkey):
267267
if 'ref' in build:
268268
_, stream = build['ref'].rsplit('/', 1)
269269
else: # let fail if this is somehow missing
270-
stream = build["coreos-assembler.oci-imported-labels"]["fedora-coreos.stream"]
270+
stream = build["coreos-assembler.oci-imported-labels"]["com.coreos.stream"]
271271

272272
# Upload them to S3. We upload to `staging/$stream` first, and then will
273273
# move them to their final location once they're verified.

0 commit comments

Comments
 (0)