Skip to content

Commit

Permalink
Merge pull request #103 from tomsquest/fix-ci
Browse files Browse the repository at this point in the history
fix: deploy versions with alpine 3.14
  • Loading branch information
tomsquest authored Nov 1, 2021
2 parents f2818c0 + 5f1b36b commit 943ce32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ addons:
- docker-ce

install:
- echo "$DOCKER_PWD" | docker login -u "$DOCKER_USER" --password-stdin
- pip install pipenv
- pipenv sync --dev

Expand All @@ -20,7 +19,7 @@ script:
- pipenv run pytest -v

deploy:
# Deploy tag
# Deploy tag except "latest"
- provider: script
on:
tags: true
Expand Down
12 changes: 8 additions & 4 deletions ci/build-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -eo pipefail

# Login to Docker
echo "$DOCKER_PWD" | docker login -u "$DOCKER_USER" --password-stdin

# Require to build docker image of other architectures
docker run --rm --privileged multiarch/qemu-user-static:register --reset

Expand All @@ -16,13 +19,14 @@ else
DOCKER_TAG="$TRAVIS_TAG"
fi

archs=(amd64 386 arm arm64)
for arch in "${archs[@]}"
do
case "$arch" in
amd64 ) base_image="balenalib/amd64-alpine:3.10" ;;
i386 ) base_image="balenalib/i386-alpine:3.10" ;;
arm ) base_image="balenalib/armv7hf-alpine:3.10" ;;
arm64 ) base_image="balenalib/aarch64-alpine:3.10" ;;
amd64 ) base_image="alpine:3.14" ;;
i386 ) base_image="balenalib/i386-alpine:3.14" ;;
arm ) base_image="balenalib/armv7hf-alpine:3.14" ;;
arm64 ) base_image="balenalib/aarch64-alpine:3.14" ;;
esac

sed "1cFROM $base_image" Dockerfile > "Dockerfile.$arch"
Expand Down

0 comments on commit 943ce32

Please sign in to comment.