@@ -167,7 +167,10 @@ def _oci_pull_impl(rctx):
167
167
fail ("Unrecognized mediaType {} in manifest file" .format (image_mf ["mediaType" ]))
168
168
169
169
image_config_file = _trim_hash_algorithm (image_mf ["config" ]["digest" ])
170
- image_config = _download (rctx , image_mf ["config" ]["digest" ], image_config_file )
170
+ _download (rctx , image_mf ["config" ]["digest" ], image_config_file )
171
+
172
+ # FIXME: hardcoding this to fix CI, but where does the value come from?
173
+ index_media_type = "application/vnd.oci.image.index.v1+json"
171
174
tars = []
172
175
for layer in image_mf ["layers" ]:
173
176
hash = _trim_hash_algorithm (layer ["digest" ])
@@ -184,6 +187,7 @@ def _oci_pull_impl(rctx):
184
187
index_mf = """\
185
188
{
186
189
"schemaVersion": 2,
190
+ "mediaType": "%s",
187
191
"manifests": [
188
192
{
189
193
"mediaType": "%s",
@@ -195,19 +199,20 @@ def _oci_pull_impl(rctx):
195
199
}
196
200
}
197
201
]
198
- }""" % (image_mf ["mediaType" ], image_mf_len , image_digest , arch , os )
202
+ }""" % (index_media_type , image_mf ["mediaType" ], image_mf_len , image_digest , arch , os )
199
203
else :
200
204
index_mf = """\
201
205
{
202
206
"schemaVersion": 2,
207
+ "mediaType": "%s",
203
208
"manifests": [
204
209
{
205
210
"mediaType": "%s",
206
211
"size": %s,
207
212
"digest": "%s"
208
213
}
209
214
]
210
- }""" % (image_mf ["mediaType" ], image_mf_len , image_digest )
215
+ }""" % (index_media_type , image_mf ["mediaType" ], image_mf_len , image_digest )
211
216
212
217
rctx .file ("BUILD.bazel" , content = _build_file .format (
213
218
name = rctx .attr .name ,
0 commit comments