Skip to content

Commit 75502a1

Browse files
committed
Manifest?
1 parent a7418df commit 75502a1

File tree

1 file changed

+33
-0
lines changed
  • github-ci/src/biocontainersci

1 file changed

+33
-0
lines changed

github-ci/src/biocontainersci/ci.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import boto3
1010
# import botocore.vendored.requests.packages.urllib3 as urllib3
1111

12+
from python_on_whales import docker as docker_whale
1213

1314
from biocontainersci.utils import send_github_pr_comment, send_status, BiocontainersCIException
1415
from biocontainersci.biotools import Biotools
@@ -213,6 +214,38 @@ def singularity(self, f):
213214
def workdir(self):
214215
return os.environ.get('GITHUB_WORKSPACE', os.getcwd())
215216

217+
def build_manifest(self, f):
218+
# We want to override the amd manifest with amd + arm
219+
# Start with dockerhub
220+
hub_manifest = None
221+
local_manifest = None
222+
223+
if self.config['dockerhub']['username']:
224+
# Might need to login here
225+
hub_manifest = docker_whale.manifest.create(
226+
self.dockerhub_name(f),
227+
[self.dockerhub_name(f), self.dockerhub_name(f, is_arm=True)],
228+
amend=True
229+
)
230+
231+
# Now, local hub:
232+
if self.local_name(f):
233+
local_manifest = docker_whale.manifest.create(
234+
self.local_name(f),
235+
[self.local_name(f), self.local_name(f, is_arm=True)],
236+
amend=True
237+
)
238+
239+
if hub_manifest:
240+
docker_whale.manifest.push(hub_manifest)
241+
if local_manifest:
242+
docker_whale.manifest.push(local_manifest)
243+
244+
if hub_manifest:
245+
docker_whale.manifest.remove(hub_manifest)
246+
if local_manifest:
247+
docker_whale.manifest.remove(local_manifest)
248+
216249
'''
217250
Execute minimal CI workflow for arm build
218251
* build container

0 commit comments

Comments
 (0)