mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2026-11-07 17:48:48 +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.
18 lines
416 B
Django/Jinja
18 lines
416 B
Django/Jinja
#!/bin/bash
|
|
|
|
set -Eeuxo pipefail
|
|
|
|
# Undeploy an image
|
|
# ./buildbtw-undeploy-image.sh <image tag>
|
|
|
|
image_tag=$1
|
|
|
|
echo "Undeploying ${image_tag}"
|
|
systemctl stop "buildbtw@${image_tag}"
|
|
rm -r "{{ buildbtw_dir }}"/instances/${image_tag}
|
|
{% if buildbtw_stage == "review" %}
|
|
# Clean up manually created symlink.
|
|
# See `buildbtw-deploy-image.sh`.
|
|
rm -f "/etc/containers/systemd/buildbtw@${image_tag}.container"
|
|
{% endif %}
|