Skip to content

Commit

Permalink
fix: specify involucro path when uploading (#941)
Browse files Browse the repository at this point in the history
Port the fixes in f482801, which were
in `pkg_test.py`, to `upload.py` as well.

ping @bgruening this is what was causing that strangely different
behavior in `mulled-build`'s `build-and-test` and `push` over in
bioconda/bioconda-recipes#43995.

After reviewing this and tracking down all the various moving parts,
it's *really* unclear how the various docker images are specified
throughout all our machinery. Explicit and implicit env vars set at
various times, sometimes overridden by default args, sometimes not,
sometimes hard-coded deep in bioconda-utils. Needs a refactor, where
everything gets specified just once in bioconda-common and used
everywhere. That's for another day though...

---------

Co-authored-by: Björn Grüning <[email protected]>
  • Loading branch information
daler and bgruening authored Nov 26, 2023
1 parent 7f83d7f commit 3086cc0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion bioconda_utils/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,22 @@ 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]

env = os.environ.copy()

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,
Expand Down

0 comments on commit 3086cc0

Please sign in to comment.