You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maintain inclusion/exclusion criteria (meta, SBOMs, signing) here
- move `subset.txt` canonical source here and invert the matching behavior (especially so that we "fail open" and new images are part of the new system automatically)
- add explicit list of Laurent's manually verified SBOM repositories and use that to determine when to `--sbom` on `docker buildx build`
- remove a bunch of `meta.jq` variance by assuming we'll target a BuildKit which can handle attestations/annotations/OCI output
- implement "signing PoC" conditional here to avoid split logic between this repository and the GHA in docker-library/meta
I have manually verified that the output of `bashbrew list --all --repos | jq -L.scripts -rsR 'include "doi"; rtrimstr("\n") | split("\n") | . - repos_anti_subset | join("\n")'` matches our current `subset.txt` exactly. 👍
Copy file name to clipboardExpand all lines: Jenkinsfile.meta
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,17 @@ node {
40
40
sh '''
41
41
git submodule update --remote --merge .doi
42
42
git submodule update --remote --merge .scripts
43
+
44
+
# TODO once "repos_anti_subset" in "doi.jq" is empty, we can remove this (and all associated usages of "subset.txt" can just be "--all" or go away completely)
45
+
# in all the places we need to interact with our "subset" it's a lot easier to have an explicit list of what's included, so we'll continue to generate "subset.txt" until it contains the full set
46
+
bashbrew list --all --repos | jq -L.scripts -rsR '
# TODO this needs to be based on the *host* architecture, not the *target* architecture (amd64 vs i386)
35
-
|index($arch)
36
-
|not
37
-
# TODO "failed to read dockerfile: failed to load cache key: subdir not supported yet" asdflkjalksdjfklasdjfklajsdklfjasdklgfnlkasdfgbhnkljasdhgouiahsdoifjnask,.dfgnklasdbngoikasdhfoiasjdklfjasdlkfjalksdjfkladshjflikashdbgiohasdfgiohnaskldfjhnlkasdhfnklasdhglkahsdlfkjasdlkfjadsklfjsdl (hence "tianon/buildkit" instead of "moby/buildkit"; need *all* the arches we care about/support for consistent support)
38
-
)
39
-
)
40
-
;
41
23
# input: "docker.io/library/foo:bar"
42
24
# output: "foo:bar"
43
25
defnormalize_ref_to_docker:
@@ -48,7 +30,7 @@ def normalize_ref_to_docker:
48
30
# output: string "pull command" ("docker pull ..."), may be multiple lines, expects to run in Bash with "set -Eeuo pipefail", might be empty
# TODO this should also be totally optional -- for example, Tianon doesn't want SBOMs on his personal images
172
-
elseemptyend,
173
-
empty
149
+
elseemptyend
174
150
elseemptyend,
175
151
"--output "+ (
176
152
[
177
-
ifshould_use_docker_buildx_driverthen
178
-
"type=docker"
179
-
else
180
-
"type=oci",
181
-
"dest=temp.tar", # TODO choose/find a good "safe" place to put this (temporarily)
182
-
empty
183
-
end,
153
+
"type=oci",
154
+
"dest=temp.tar", # TODO choose/find a good "safe" place to put this (temporarily)
184
155
empty
185
156
]
186
157
|@csv
187
158
|@sh
188
159
),
189
160
(
190
-
if$supportsAnnotationsAndAttestsationsthen
191
-
build_annotations($buildUrl)
192
-
|to_entries
193
-
# separate loops so that "image manifest" annotations are grouped separate from the index/descriptor annotations (easier to read)
194
-
| (
195
-
.[]
196
-
|@sh"--annotation \(.key+"="+.value)"
197
-
),
198
-
(
199
-
.[]
200
-
|@sh"--annotation \(
201
-
"manifest-descriptor:"+.key+"="
202
-
+if.key=="org.opencontainers.image.created"then
203
-
# the "current" time breaks reproducibility (for the purposes of build verification), so we put "now" in the image index but "SOURCE_DATE_EPOCH" in the image manifest (which is the thing we'd ideally like to have reproducible, eventually)
# (this assumes the actual build is going to happen shortly after generating the command)
206
-
else.valueend
207
-
)",
208
-
empty
209
-
)
210
-
elseemptyend
161
+
build_annotations($buildUrl)
162
+
|to_entries
163
+
# separate loops so that "image manifest" annotations are grouped separate from the index/descriptor annotations (easier to read)
164
+
| (
165
+
.[]
166
+
|@sh"--annotation \(.key+"="+.value)"
167
+
),
168
+
(
169
+
.[]
170
+
|@sh"--annotation \(
171
+
"manifest-descriptor:"+.key+"="
172
+
+if.key=="org.opencontainers.image.created"then
173
+
# the "current" time breaks reproducibility (for the purposes of build verification), so we put "now" in the image index but "SOURCE_DATE_EPOCH" in the image manifest (which is the thing we'd ideally like to have reproducible, eventually)
0 commit comments