Skip to content

Commit

Permalink
docker(blueprints): move architecture from image name to tag (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlopez-rod authored Aug 15, 2024
1 parent 9d7b075 commit 2061338
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 17 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ The format of this changelog is based on
## [Unreleased]

- Do not create image names with the architecture in it. Instead the
architecture should be added as a tag.

## [0.35.2] <a name="0.35.2" href="#0.35.2">-</a> June 18, 2024

- Add missing docker tag. There was other parts of the code that were missing
Expand Down
2 changes: 1 addition & 1 deletion packages/python/m/ci/docker/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def ci_manifest(self: 'DockerImage', m_env: MEnvDocker) -> Res[str]:
for tag in tags
]
all_archs_str = ' \\\n'.join([
f' {registry}/{arch}-{self.image_name}:{m_tag}'
f' {registry}/{self.image_name}:{arch}-{m_tag}'
for arch in m_env.architectures
])
script = [
Expand Down
4 changes: 2 additions & 2 deletions packages/python/m/ci/docker/shell_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#!/bin/bash
imageName=$1
set -euxo pipefail
docker tag staged-image:latest "{docker_registry}/$ARCH-$imageName:$M_TAG"
docker push "{docker_registry}/$ARCH-$imageName:$M_TAG"
docker tag staged-image:latest "{docker_registry}/$imageName:$ARCH-$M_TAG"
docker push "{docker_registry}/$imageName:$ARCH-$M_TAG"
"""

PUSH_SCRIPT_TAGS = """\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
imageName=$1
set -euxo pipefail
docker tag staged-image:latest "ghcr.io/repo-owner/$ARCH-$imageName:$M_TAG"
docker push "ghcr.io/repo-owner/$ARCH-$imageName:$M_TAG"
docker tag staged-image:latest "ghcr.io/repo-owner/$imageName:$ARCH-$M_TAG"
docker push "ghcr.io/repo-owner/$imageName:$ARCH-$M_TAG"
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ docker buildx imagetools create \
-t ghcr.io/repo-owner/m-image1:v1 \
-t ghcr.io/repo-owner/m-image1:v1.1 \
-t ghcr.io/repo-owner/m-image1:master \
ghcr.io/repo-owner/amd64-m-image1:1.1.1 \
ghcr.io/repo-owner/arm64-m-image1:1.1.1
ghcr.io/repo-owner/m-image1:amd64-1.1.1 \
ghcr.io/repo-owner/m-image1:arm64-1.1.1
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ docker buildx imagetools create \
-t ghcr.io/repo-owner/m-image2:v1 \
-t ghcr.io/repo-owner/m-image2:v1.1 \
-t ghcr.io/repo-owner/m-image2:master \
ghcr.io/repo-owner/amd64-m-image2:1.1.1 \
ghcr.io/repo-owner/arm64-m-image2:1.1.1
ghcr.io/repo-owner/m-image2:amd64-1.1.1 \
ghcr.io/repo-owner/m-image2:arm64-1.1.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
imageName=$1
set -euxo pipefail
docker tag staged-image:latest "ghcr.io/repo-owner/$ARCH-$imageName:$M_TAG"
docker push "ghcr.io/repo-owner/$ARCH-$imageName:$M_TAG"
docker tag staged-image:latest "ghcr.io/repo-owner/$imageName:$ARCH-$M_TAG"
docker push "ghcr.io/repo-owner/$imageName:$ARCH-$M_TAG"
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ docker buildx imagetools create \
-t ghcr.io/repo-owner/m-image1:v1 \
-t ghcr.io/repo-owner/m-image1:v1.1 \
-t ghcr.io/repo-owner/m-image1:master \
ghcr.io/repo-owner/amd64-m-image1:1.1.1 \
ghcr.io/repo-owner/arm64-m-image1:1.1.1
ghcr.io/repo-owner/m-image1:amd64-1.1.1 \
ghcr.io/repo-owner/m-image1:arm64-1.1.1
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ docker buildx imagetools create \
-t ghcr.io/repo-owner/m-image2:v1 \
-t ghcr.io/repo-owner/m-image2:v1.1 \
-t ghcr.io/repo-owner/m-image2:master \
ghcr.io/repo-owner/amd64-m-image2:1.1.1 \
ghcr.io/repo-owner/arm64-m-image2:1.1.1
ghcr.io/repo-owner/m-image2:amd64-1.1.1 \
ghcr.io/repo-owner/m-image2:arm64-1.1.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
imageName=$1
set -euxo pipefail
docker tag staged-image:latest "ghcr.io/repo-owner/$ARCH-$imageName:$M_TAG"
docker push "ghcr.io/repo-owner/$ARCH-$imageName:$M_TAG"
docker tag staged-image:latest "ghcr.io/repo-owner/$imageName:$ARCH-$M_TAG"
docker push "ghcr.io/repo-owner/$imageName:$ARCH-$M_TAG"

0 comments on commit 2061338

Please sign in to comment.