upload

Deploy Artifacts to Anaconda and Quay

Functions

anaconda_upload(package[, token, label])

Upload a package to anaconda.

mulled_upload(image, quay_target)

Upload the build Docker images to quay.io with mulled-build push.

skopeo_upload(image_file, target, creds[, …])

Upload an image to docker registy

Documentation

bioconda_utils.upload.anaconda_upload(package, token=None, label=None)[source]

Upload a package to anaconda.

Parameters
  • package (str) – Filename to built package

  • token (Optional[str]) – If None, use the environment variable ANACONDA_TOKEN, otherwise, use this as the token for authenticating the anaconda client.

  • label (Optional[str]) – Optional label to add

Return type

bool

Returns

True if the operation succeeded, False if it cannot succeed, None if it should be retried

Raises

ValueError

bioconda_utils.upload.mulled_upload(image, quay_target)[source]

Upload the build Docker images to quay.io with mulled-build push.

Calls mulled-build push <image> -n <quay_target>

Parameters
  • image (str) – name of image to push

  • quary_target – name of image on quay

Return type

CompletedProcess

bioconda_utils.upload.skopeo_upload(image_file, target, creds, registry='quay.io', timeout=600)[source]

Upload an image to docker registy

Uses skopeo to upload tar archives of docker images as created with e.g.``docker save`` to a docker registry.

The image name and tag are read from the archive.

Parameters
  • image_file (str) – path to the file to be uploaded (may be gzip’ed)

  • target (str) – namespace/repo for the image

  • creds (str) – login credentials (USER:PASS)

  • registry (str) – url of the registry. defaults to “quay.io”

  • timeout (int) – timeout in seconds

Return type

bool