mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 19:31:35 +00:00
Move prod dockerfiles to prod folder, work on manifests
This commit is contained in:
parent
ee6a253641
commit
5539c646ec
5 changed files with 45 additions and 9 deletions
|
@ -50,7 +50,7 @@ set -xe
|
|||
git checkout master
|
||||
|
||||
# Changing the docker-compose prod
|
||||
sed -i "s/asonix\/pictrs:.*/asonix\/pictrs:amd64-$new_tag/" ../prod/docker-compose.yml
|
||||
sed -i "s/asonix\/pictrs:.*/asonix\/pictrs:amd64-$new_tag/" docker-compose.yml
|
||||
git add ../prod/docker-compose.yml
|
||||
|
||||
# The commit
|
||||
|
@ -61,14 +61,7 @@ git tag $new_tag
|
|||
git push origin $new_tag
|
||||
git push
|
||||
|
||||
# Rebuilding docker
|
||||
# docker-compose build
|
||||
# docker tag dev_pictrs:latest asonix/pictrs:x64-$new_tag-dev
|
||||
# docker tag dev_pictrs:latest asonix/pictrs:x64-latest-dev
|
||||
# docker push asonix/pictrs:x64-$new_tag-dev
|
||||
# docker push asonix/pictrs:x64-latest-dev
|
||||
|
||||
# Build for arm64v8 and arm32v7
|
||||
# Build for arm64v8, arm32v7, and amd64
|
||||
build_image $new_tag arm64v8
|
||||
build_image $new_tag arm32v7
|
||||
build_image $new_tag amd64
|
43
docker/prod/manifest.sh
Executable file
43
docker/prod/manifest.sh
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
function require() {
|
||||
if [ "$1" = "" ]; then
|
||||
echo "input '$2' required"
|
||||
print_help
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
function print_help() {
|
||||
echo "deploy.sh"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo " manifest.sh [tag]"
|
||||
echo ""
|
||||
echo "Args:"
|
||||
echo " tag: The git tag to be applied to the image manifest"
|
||||
}
|
||||
|
||||
function annotate() {
|
||||
tag=$1
|
||||
arch=$2
|
||||
|
||||
docker manifest annotate asonix/pictrs:$tag \
|
||||
asonix/pictrs:$arch-$tag --os linux --arch $arch
|
||||
}
|
||||
|
||||
new_tag=$1
|
||||
|
||||
require "$new_tag" "tag"
|
||||
|
||||
set -xe
|
||||
|
||||
docker manifest create asonix/pictrs:$new_tag \
|
||||
asonix/pictrs:arm64v8-$new_tag \
|
||||
asonix/pictrs:arm32v7-$new_tag \
|
||||
asonix/pictrs:amd64-$new_tag
|
||||
|
||||
annotate $new_tag arm64v8
|
||||
annotate $new_tag arm32v7
|
||||
annotate $new_tag amd64
|
||||
|
||||
# docker manifest push asonix/pictrs:$new_tag
|
Loading…
Reference in a new issue