Skip to content

Commit

Permalink
Add major version docker tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
metaskills committed May 20, 2023
1 parent 85f020a commit 67f6c3b
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [1.1.1] - 2023-05-20

- Simple major version docker tags. Ex: 1

## [1.1.0] - 2023-01-18

- Add arm64 support.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "crypteia"
version = "1.1.0"
version = "1.1.1"
edition = "2021"

[[bin]]
Expand Down
12 changes: 12 additions & 0 deletions package/deploy-image-amzn
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,31 @@ if [ -z "${CRYPTEIA_VERSION}" ]; then
exit 1
fi

CRYPTEIA_VERSION_MAJOR=$(echo "${CRYPTEIA_VERSION}" | cut -d. -f1)

docker login ghcr.io -u "cink-continuous-integration" -p $DOCKER_LOGIN_PAT

./amzn/setup
BASE_NAME_AMD64="ghcr.io/rails-lambda/crypteia-extension-amzn-amd64"
docker build \
--platform linux/amd64 \
--tag "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION_MAJOR}" \
--tag "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
--tag "${BASE_NAME_AMD64}:latest" \
--file package/Dockerfile .
docker push "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION_MAJOR}"
docker push "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}"
docker push "${BASE_NAME_AMD64}:latest"

./amzn/setup-arm64
BASE_NAME_ARM64="ghcr.io/rails-lambda/crypteia-extension-amzn-arm64"
docker build \
--platform linux/arm64 \
--tag "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION_MAJOR}" \
--tag "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}" \
--tag "${BASE_NAME_ARM64}:latest" \
--file package/Dockerfile .
docker push "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION_MAJOR}"
docker push "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
docker push "${BASE_NAME_ARM64}:latest"

Expand All @@ -34,6 +40,12 @@ docker manifest create \
--amend "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
docker manifest push "ghcr.io/rails-lambda/crypteia-extension-amzn:${CRYPTEIA_VERSION}"

docker manifest create \
"ghcr.io/rails-lambda/crypteia-extension-amzn:${CRYPTEIA_VERSION}" \
--amend "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
--amend "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
docker manifest push "ghcr.io/rails-lambda/crypteia-extension-amzn:${CRYPTEIA_VERSION}"

docker manifest create \
"ghcr.io/rails-lambda/crypteia-extension-amzn:latest" \
--amend "${BASE_NAME_AMD64}:latest" \
Expand Down
12 changes: 12 additions & 0 deletions package/deploy-image-debian
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,40 @@ if [ -z "${CRYPTEIA_VERSION}" ]; then
exit 1
fi

CRYPTEIA_VERSION_MAJOR=$(echo "${CRYPTEIA_VERSION}" | cut -d. -f1)

docker login ghcr.io -u "cink-continuous-integration" -p $DOCKER_LOGIN_PAT

./bin/setup
BASE_NAME_AMD64="ghcr.io/rails-lambda/crypteia-extension-debian-amd64"
docker build \
--platform linux/amd64 \
--tag "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION_MAJOR}" \
--tag "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
--tag "${BASE_NAME_AMD64}:latest" \
--file package/Dockerfile .
docker push "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION_MAJOR}"
docker push "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}"
docker push "${BASE_NAME_AMD64}:latest"

./debian/setup-arm64
BASE_NAME_ARM64="ghcr.io/rails-lambda/crypteia-extension-debian-arm64"
docker build \
--platform linux/arm64 \
--tag "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION_MAJOR}" \
--tag "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}" \
--tag "${BASE_NAME_ARM64}:latest" \
--file package/Dockerfile .
docker push "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION_MAJOR}"
docker push "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION}"
docker push "${BASE_NAME_ARM64}:latest"

docker manifest create \
"ghcr.io/rails-lambda/crypteia-extension-debian:${CRYPTEIA_VERSION_MAJOR}" \
--amend "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION_MAJOR}" \
--amend "${BASE_NAME_ARM64}:${CRYPTEIA_VERSION_MAJOR}"
docker manifest push "ghcr.io/rails-lambda/crypteia-extension-debian:${CRYPTEIA_VERSION_MAJOR}"

docker manifest create \
"ghcr.io/rails-lambda/crypteia-extension-debian:${CRYPTEIA_VERSION}" \
--amend "${BASE_NAME_AMD64}:${CRYPTEIA_VERSION}" \
Expand Down

0 comments on commit 67f6c3b

Please sign in to comment.