hcloud build script
Some checks failed
dockers/pixelfed/pipeline/head There was a failure building this commit
Some checks failed
dockers/pixelfed/pipeline/head There was a failure building this commit
This commit is contained in:
parent
71d13451f1
commit
dd3488fa0c
1 changed files with 34 additions and 0 deletions
34
hcloud-build.sh
Executable file
34
hcloud-build.sh
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
hcloud server create --datacenter nbg1-dc3 --image "debian-12" --type cpx41 --ssh-key cg@melpomene --ssh-key jenkins@toolbox --name pixelbuild
|
||||||
|
pixelbuild_ip=$(hcloud server ip pixelbuild)
|
||||||
|
ssh_cmd="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@${pixelbuild_ip}"
|
||||||
|
timeStamp=$(date -I)
|
||||||
|
|
||||||
|
$ssh_cmd apt update
|
||||||
|
$ssh_cmd apt install -y --no-install-recommends buildah qemu-user-static podman
|
||||||
|
rsync -av -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" . root@"${pixelbuild_ip}":zknt-pixelfed
|
||||||
|
$ssh_cmd buildah login -u "${IO_CRED_USR}" -p "${IO_CRED_PSW}" docker.io
|
||||||
|
$ssh_cmd buildah login -u "${QUAY_CRED_USR}" -p "${QUAY_CRED_PSW}" quay.io
|
||||||
|
|
||||||
|
$ssh_cmd buildah manifest create pixelfed-dev
|
||||||
|
$ssh_cmd buildah manifest create pixelfed-dev-fpm
|
||||||
|
$ssh_cmd buildah bud -f Containerfile --build-arg DATE="$timeStamp" --manifest pixelfed-dev --arch amd64
|
||||||
|
$ssh_cmd buildah bud -f Containerfile --build-arg DATE="$timeStamp" --manifest pixelfed-dev --arch arm64
|
||||||
|
$ssh_cmd buildah bud -f Containerfile.fpm --build-arg DATE="$timeStamp" --manifest pixelfed-dev-fpm --arch amd64
|
||||||
|
$ssh_cmd buildah bud -f Containerfile.fpm --build-arg DATE="$timeStamp" --manifest pixelfed-dev-fpm --arch arm64
|
||||||
|
|
||||||
|
$ssh_cmd buildah manifest push --all pixelfed-dev docker://quay.io/zknt/pixelfed:dev
|
||||||
|
$ssh_cmd buildah manifest push --all pixelfed-dev docker://quay.io/zknt/pixelfed:latest
|
||||||
|
$ssh_cmd buildah manifest push --all pixelfed-dev docker://quay.io/zknt/pixelfed:"$timeStamp"
|
||||||
|
$ssh_cmd buildah manifest push --all pixelfed-dev-fpm docker://quay.io/zknt/pixelfed:dev-fpm
|
||||||
|
$ssh_cmd buildah manifest push --all pixelfed-dev-fpm docker://quay.io/zknt/pixelfed:fpm
|
||||||
|
$ssh_cmd buildah manifest push --all pixelfed-dev-fpm docker://quay.io/zknt/pixelfed:"$timeStamp-fpm"
|
||||||
|
|
||||||
|
$ssh_cmd buildah manifest push --all pixelfed-dev docker://docker.io/zknt/pixelfed:dev
|
||||||
|
$ssh_cmd buildah manifest push --all pixelfed-dev docker://docker.io/zknt/pixelfed:latest
|
||||||
|
$ssh_cmd buildah manifest push --all pixelfed-dev docker://docker.io/zknt/pixelfed:"$timeStamp"
|
||||||
|
$ssh_cmd buildah manifest push --all pixelfed-dev-fpm docker://docker.io/zknt/pixelfed:dev-fpm
|
||||||
|
$ssh_cmd buildah manifest push --all pixelfed-dev-fpm docker://docker.io/zknt/pixelfed:fpm
|
||||||
|
$ssh_cmd buildah manifest push --all pixelfed-dev-fpm docker://docker.io/zknt/pixelfed:"$timeStamp-fpm"
|
||||||
|
|
||||||
|
hcloud server delete pixelbuild
|
Loading…
Reference in a new issue