Skip to content

Commit 72b98a9

Browse files
committed
improve comments/docs
1 parent 0f777f3 commit 72b98a9

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

.github/workflows/build-images.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,25 @@ jobs:
270270
271271
source images/versions.sh
272272
273-
# Figure out which registry to use for each image, based on what was built.
273+
# Figure out which registry to use for each image. If we built an image
274+
# during this workflow run, it was pushed to ghcr.io as a staging area.
275+
# If it was not built during this run, then we use the exissting one on
276+
# quay.io.
274277
[ ${{ needs.build-build-env.outputs.TAG_EXISTS_build-env }} ] && BUILD_ENV_REGISTRY='quay.io/bioconda' || BUILD_ENV_REGISTRY="ghcr.io/bioconda"
275278
[ ${{ needs.build-create-env.outputs.TAG_EXISTS_create-env }} ] && CREATE_ENV_REGISTRY='quay.io/bioconda' || CREATE_ENV_REGISTRY="ghcr.io/bioconda"
276279
[ ${{ needs.build-base-busybox.outputs.TAG_EXISTS_base_busybox }} ] && DEST_BASE_REGISTRY='quay.io/bioconda' || DEST_BASE_REGISTRY="ghcr.io/bioconda"
277280
[ ${{ needs.build-base-debian.outputs.TAG_EXISTS_base_debian }} ] && DEST_EXTENDED_BASE_REGISTRY='quay.io/bioconda' || DEST_EXTENDED_BASE_REGISTRY="ghcr.io/bioconda"
278281
279282
# Tell mulled-build which image to use
283+
#
284+
# DEST_BASE_IMAGE, DEFAULT_BASE_IMAGE, and DEFAULT_EXTENDED_BASE_IMAGE
285+
# are hard-coded by mulled-build, e.g.
286+
# https://github.com/galaxyproject/galaxy/blob/957f6f5475f8f96c6af110be10791b5acab3a0df/lib/galaxy/tool_util/deps/mulled/mulled_build.py#L62-L71
287+
# We keep DEST_BASE_IMAGE unset so it defaults to DEFAULT_BASE_IMAGE or
288+
# DEFAULT_EXTENDED_BASE_IMAGE.
280289
export DEFAULT_BASE_IMAGE="${DEST_BASE_REGISTRY}/${BASE_BUSYBOX_IMAGE_NAME}:${BASE_TAG}"
281290
export DEFAULT_EXTENDED_BASE_IMAGE="${DEST_EXTENDED_BASE_REGISTRY}/${BASE_DEBIAN_IMAGE_NAME}:${BASE_TAG}"
291+
282292
export BUILD_ENV_IMAGE="${BUILD_ENV_REGISTRY}/${BUILD_ENV_IMAGE_NAME}:${BIOCONDA_IMAGE_TAG}"
283293
export CREATE_ENV_IMAGE="${CREATE_ENV_REGISTRY}/${CREATE_ENV_IMAGE_NAME}:${BIOCONDA_IMAGE_TAG}"
284294

images/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,17 @@ following:
2323
```bash
2424
source versions.sh
2525

26-
export BUILD_ENV_IMAGE="localhost/${BUILD_ENV_IMAGE_NAME}:${BIOCONDA_IMAGE_TAG}"
26+
# When running on GitHub Actions, this would be ghcr.io or quay.io
27+
export BUILD_ENV_REGISTRY="localhost"
2728

29+
# Similarly, when running on GitHub Actions, this would normally pull the
30+
# manifest (which does not have the -amd64 suffix) from ghcr.io or quay.io. There
31+
# does not seem to be a way to get podman-created manifests over to docker, or
32+
# even to make local docker manifests. So we need to reference the image
33+
# directly including the arch suffix.
34+
export BUILD_ENV_IMAGE="localhost/${BUILD_ENV_IMAGE_NAME}:${BIOCONDA_IMAGE_TAG}-amd64"
35+
36+
# Each takes 3-10 min (build-env takes the longest)
2837
bash build.sh base-glibc-busybox-bash
2938
bash build.sh base-glibc-debian-bash
3039
bash build.sh build-env

images/build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ for arch in $ARCHS; do
7575
image_id="$( buildah commit "${container}" )"
7676
buildah rm "${container}"
7777

78-
# Add image to manifest
78+
# Add -$arch suffix to image's tag
7979
buildah tag "${image_id}" "${IMAGE_NAME}:${TAG}-${arch}"
80+
81+
# Add it to the manifest, which has no -$arch suffix
8082
buildah manifest add "${IMAGE_NAME}:${TAG}" "${image_id}"
8183

8284
# copy image over to local docker registry, when running locally. Otherwise,

0 commit comments

Comments
 (0)