mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2026-11-07 12:38:46 +01:00
Earlier all of buildbtw would live in the same dir at /var/lib/buildbtw which was especially annoying for the review instances where we'd get 10s of databases in the same dir. This now also correctly cleans up old instance dirs.
20 lines
648 B
Django/Jinja
20 lines
648 B
Django/Jinja
#!/bin/bash
|
|
|
|
set -Eeuxo pipefail
|
|
|
|
# Deploy an image
|
|
# ./buildbtw-deploy-image.sh <image tag>
|
|
|
|
image_tag=$1
|
|
|
|
# Restart so that a potentially newer image may get pulled
|
|
echo "Deploying ${image_tag}"
|
|
mkdir -p "{{ buildbtw_dir }}"/instances/${image_tag}
|
|
systemctl restart "buildbtw@${image_tag}"
|
|
{% if buildbtw_stage == "review" %}
|
|
# Manual symlink (as suggested in podman-systemd.unit(5) because this will
|
|
# generate a service and generated/transient services can't be enabled. We can
|
|
# manually instantiate them, however, to make sure they run on boot.
|
|
ln -sf buildbtw@.container "/etc/containers/systemd/buildbtw@${image_tag}.container"
|
|
{% endif %}
|