From dc501ed0563d6fddfe672944c3617b9b27c9558f Mon Sep 17 00:00:00 2001 From: Ryan Dale Date: Sat, 25 Nov 2023 19:59:05 -0500 Subject: [PATCH 1/3] [fix] specify involucro path when uploading --- bioconda_utils/upload.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bioconda_utils/upload.py b/bioconda_utils/upload.py index f3c69e6fb8..ef93eea87d 100644 --- a/bioconda_utils/upload.py +++ b/bioconda_utils/upload.py @@ -76,6 +76,13 @@ def mulled_upload(image: str, quay_target: str) -> sp.CompletedProcess: quary_target: name of image on quay """ cmd = ['mulled-build', 'push', image, '-n', quay_target] + + # galaxy-lib always downloads involucro, unless it's in cwd or its path is + # explicitly given. + involucro_path = os.path.join(os.path.dirname(__file__), 'involucro') + if not os.path.exists(involucro_path): + raise RuntimeError('internal involucro wrapper missing') + cmd += ['--involucro-path', involucro_path] mask = [] if os.environ.get('QUAY_OAUTH_TOKEN', False): token = os.environ['QUAY_OAUTH_TOKEN'] From 65ec30a5eeb39bac4e116bc2dca02c0fc60390ef Mon Sep 17 00:00:00 2001 From: Ryan Dale Date: Sat, 25 Nov 2023 20:33:30 -0500 Subject: [PATCH 2/3] set proper env var for mulled-build --- bioconda_utils/upload.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bioconda_utils/upload.py b/bioconda_utils/upload.py index ef93eea87d..0f7d963d7a 100644 --- a/bioconda_utils/upload.py +++ b/bioconda_utils/upload.py @@ -83,12 +83,18 @@ def mulled_upload(image: str, quay_target: str) -> sp.CompletedProcess: if not os.path.exists(involucro_path): raise RuntimeError('internal involucro wrapper missing') cmd += ['--involucro-path', involucro_path] + + env = os.environ.copy() + + # Env var expected by mulled-build + env["DEST_BASE_IMAGE"] = base_image + mask = [] if os.environ.get('QUAY_OAUTH_TOKEN', False): token = os.environ['QUAY_OAUTH_TOKEN'] cmd.extend(['--oauth-token', token]) mask = [token] - return utils.run(cmd, mask=mask) + return utils.run(cmd, mask=mask, env=env) def skopeo_upload(image_file: str, target: str, From 24b3698aa9452e496142f2860dca148b91cf57ed Mon Sep 17 00:00:00 2001 From: Ryan Dale Date: Sat, 25 Nov 2023 21:45:57 -0500 Subject: [PATCH 3/3] DEST_BASE_IMAGE should already be in env --- bioconda_utils/upload.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/bioconda_utils/upload.py b/bioconda_utils/upload.py index 0f7d963d7a..81aa84b1f2 100644 --- a/bioconda_utils/upload.py +++ b/bioconda_utils/upload.py @@ -86,9 +86,6 @@ def mulled_upload(image: str, quay_target: str) -> sp.CompletedProcess: env = os.environ.copy() - # Env var expected by mulled-build - env["DEST_BASE_IMAGE"] = base_image - mask = [] if os.environ.get('QUAY_OAUTH_TOKEN', False): token = os.environ['QUAY_OAUTH_TOKEN']