File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ use crate::run_cmd;
2424pub struct DockerArchive {
2525 build_appliance : BuildAppliance ,
2626 oci : PathBuf ,
27+ repo_tags : Vec < String > ,
2728}
2829
2930impl DockerArchive {
@@ -50,6 +51,11 @@ impl DockerArchive {
5051 . command ( "skopeo" ) ?
5152 . arg ( "copy" )
5253 . arg ( oci_arg)
54+ . args (
55+ self . repo_tags
56+ . iter ( )
57+ . map ( |t| format ! ( "--additional-tag={t}" ) ) ,
58+ )
5359 . arg ( "docker-archive:/__antlir2__/out/docker_archive" ) ,
5460 )
5561 . context ( "Failed to convert to docker-archive" ) ?;
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ def _impl(ctx: AnalysisContext) -> Promise:
2222 {"docker_archive" : {
2323 "build_appliance" : build_appliance [BuildApplianceInfo ].dir ,
2424 "oci" : oci ,
25+ "repo_tags" : ctx .attrs .repo_tags ,
2526 }},
2627 with_inputs = True ,
2728 )
@@ -51,7 +52,9 @@ def _impl(ctx: AnalysisContext) -> Promise:
5152
5253_docker_archive = rule (
5354 impl = _impl ,
54- attrs = oci_attrs | layer_attrs | default_attrs | common_attrs ,
55+ attrs = {
56+ "repo_tags" : attrs .list (attrs .string (), default = []),
57+ } | oci_attrs | layer_attrs | default_attrs | common_attrs ,
5558 cfg = package_cfg ,
5659)
5760
You can’t perform that action at this time.
0 commit comments