Skip to content

Commit

Permalink
Added missing multi-arch docker image manifest step from release
Browse files Browse the repository at this point in the history
  • Loading branch information
ernoaapa committed Feb 12, 2018
1 parent f7d445c commit b97fea4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,17 @@ jobs:
- checkout
- setup_remote_docker

- run: go get github.com/goreleaser/goreleaser
- run:
name: Login Docker hub
command: echo $DOCKER_PASS | docker login --username $DOCKER_USER --password-stdin

- run:
name: Install tools
command: |
go get github.com/goreleaser/goreleaser
go get github.com/estesp/manifest-tool
- run: goreleaser
- run: .circleci/scripts/push-docker-manifest.sh $(git describe --tags --always --dirty)

workflows:
version: 2
Expand Down
20 changes: 20 additions & 0 deletions .circleci/scripts/push-docker-manifest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
#
# Push multi arch Docker image manifest
#
set -euo pipefail

IMAGE="ernoaapa/eliotd"
PLATFORMS="linux/amd64,linux/arm64"
VERSION=$1

echo "Push multi arch manifest for version: ${VERSION} to ${IMAGE}"
echo "Platforms: ${PLATFORMS}"

manifest-tool \
--username ${DOCKER_USER} \
--password ${DOCKER_PASS} \
push from-args \
--platforms $PLATFORMS \
--template ${IMAGE}:${VERSION}-ARCH \
--target ${IMAGE}:${VERSION}

0 comments on commit b97fea4

Please sign in to comment.