File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -131,9 +131,20 @@ build_with_buildah() {
131
131
fi
132
132
fi
133
133
134
+ # Here we call prepare_git_artifacts just for its git logic, We don't
135
+ # actually care about the JSON file; the source of truth is in the labels.
136
+ prepare_git_artifacts src/config " ${tempdir} /coreos-assembler-config-git.json"
137
+ source=$( jq -r .git.origin " ${tempdir} /coreos-assembler-config-git.json" )
138
+ commit=$( jq -r .git.commit " ${tempdir} /coreos-assembler-config-git.json" )
139
+ rm -f " ${tempdir} /coreos-assembler-config-git.json"
140
+
141
+ # For the source: check if there's only one remote, if so use it with get-url
142
+ # For revision: rev-parse
134
143
set -- build --security-opt=label=disable --cap-add=all --device /dev/fuse \
135
144
--build-arg-file " $argsfile " -v " $( realpath " ${tempdir} /src" ) " :/run/src \
136
- --build-arg VERSION=" ${VERSION} "
145
+ --build-arg VERSION=" ${VERSION} " \
146
+ --label org.opencontainers.image.source=" ${source} " \
147
+ --label org.opencontainers.image.revision=" ${commit} "
137
148
138
149
# XXX: Temporary hack until we have https://github.com/coreos/rpm-ostree/pull/5454
139
150
# which would allow us to fold this back into the build process.
You can’t perform that action at this time.
0 commit comments