2022-01-01 20:36:00 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-01-02 13:05:02 +00:00
|
|
|
# the goal of this script is to ensure basic core functionality is working
|
|
|
|
# before we make new releases. we try to make a balance between manual testing
|
|
|
|
# and automated testing, i.e. we don't invest too much time in a fragile
|
|
|
|
# automation that costs us more time to maintain and instead just do the test
|
2022-01-02 13:59:34 +00:00
|
|
|
# manually (see `../manual/manual.md` for more). it is a balance which we
|
|
|
|
# figure out together.
|
2022-01-02 13:05:02 +00:00
|
|
|
|
2022-01-01 21:04:04 +00:00
|
|
|
set -ex
|
2022-01-01 20:36:00 +00:00
|
|
|
|
|
|
|
ABRA="$HOME/.local/bin/abra -d"
|
|
|
|
INSTALLER_URL="https://install.abra.coopcloud.tech"
|
|
|
|
|
|
|
|
for arg in "$@"; do
|
|
|
|
if [ "$arg" == "--dev" ]; then
|
|
|
|
ABRA="/src/abra -d"
|
|
|
|
INSTALLER_URL="https://git.coopcloud.tech/coop-cloud/abra/raw/branch/main/scripts/installer/installer"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
export PATH=$PATH:$HOME/.local/bin
|
|
|
|
|
2022-01-01 21:04:04 +00:00
|
|
|
# ========================================================================
|
|
|
|
# choosing abra executable for test run
|
|
|
|
# ========================================================================
|
2022-01-01 20:36:00 +00:00
|
|
|
echo "choosing $ABRA as abra executable"
|
|
|
|
echo "choosing $INSTALLER_URL as abra installer url"
|
|
|
|
|
2022-01-01 21:04:04 +00:00
|
|
|
# ========================================================================
|
|
|
|
# latest stable release
|
|
|
|
# ========================================================================
|
2022-01-01 20:36:00 +00:00
|
|
|
wget -O- https://install.abra.autonomic.zone | bash
|
|
|
|
~/.local/bin/abra -v
|
|
|
|
|
2022-01-01 21:04:04 +00:00
|
|
|
# ========================================================================
|
|
|
|
# latest rc release
|
|
|
|
# ========================================================================
|
2022-01-01 20:36:00 +00:00
|
|
|
wget -O- https://install.abra.autonomic.zone | bash -s -- --rc
|
|
|
|
~/.local/bin/abra -v
|
|
|
|
|
2022-01-01 21:04:04 +00:00
|
|
|
# ========================================================================
|
|
|
|
# upgrade to stable in-place
|
|
|
|
# ========================================================================
|
2022-01-01 20:36:00 +00:00
|
|
|
$ABRA upgrade
|
|
|
|
~/.local/bin/abra -v
|
|
|
|
|
2022-01-01 21:04:04 +00:00
|
|
|
# ========================================================================
|
|
|
|
# upgrade to rc in-place
|
|
|
|
# ========================================================================
|
2022-01-01 20:36:00 +00:00
|
|
|
$ABRA upgrade --rc
|
|
|
|
~/.local/bin/abra -v
|
|
|
|
|
2022-01-01 21:04:04 +00:00
|
|
|
# ========================================================================
|
|
|
|
# autocomplete
|
|
|
|
# ========================================================================
|
2022-01-01 20:36:00 +00:00
|
|
|
$ABRA autocomplete bash
|
|
|
|
$ABRA autocomplete fizsh
|
|
|
|
$ABRA autocomplete zsh
|
|
|
|
|
2022-01-01 21:04:04 +00:00
|
|
|
# ========================================================================
|
|
|
|
# record command
|
|
|
|
# ========================================================================
|
2022-01-02 19:18:37 +00:00
|
|
|
$ABRA record new -p gandi -t A -n int-core -v 192.157.2.21 coopcloud.tech
|
|
|
|
$ABRA record list -p gandi coopcloud.tech | grep -q int-core
|
|
|
|
$ABRA -n record rm -p gandi -t A -n int-core coopcloud.tech
|
2022-01-01 20:36:00 +00:00
|
|
|
|
2022-01-01 21:04:04 +00:00
|
|
|
# ========================================================================
|
|
|
|
# catalogue command
|
|
|
|
# ========================================================================
|
|
|
|
$ABRA catalogue generate
|
|
|
|
$ABRA catalogue generate -s gitea
|
|
|
|
|
|
|
|
# ========================================================================
|
|
|
|
# recipe command
|
|
|
|
# ========================================================================
|
|
|
|
$ABRA recipe new testrecipe
|
|
|
|
|
|
|
|
$ABRA recipe list
|
|
|
|
$ABRA recipe list -p cloud
|
|
|
|
|
|
|
|
$ABRA recipe versions peertube
|
|
|
|
|
|
|
|
$ABRA recipe lint gitea
|
|
|
|
|
|
|
|
# ========================================================================
|
|
|
|
# server command
|
|
|
|
# ========================================================================
|
2022-01-02 19:18:37 +00:00
|
|
|
$ABRA -n server new -p hetzner-cloud --hn int-core
|
2022-01-01 21:04:04 +00:00
|
|
|
|
2022-01-02 19:18:37 +00:00
|
|
|
$ABRA server ls | grep -q int-core
|
2022-01-02 13:05:02 +00:00
|
|
|
|
2022-01-02 19:18:37 +00:00
|
|
|
$ABRA -n server rm -s -p hetzner-cloud --hn int-core
|
2022-01-02 13:05:02 +00:00
|
|
|
|
2022-01-01 21:04:04 +00:00
|
|
|
# ========================================================================
|
|
|
|
# app command
|
|
|
|
# ========================================================================
|
|
|
|
|
2022-01-02 14:04:49 +00:00
|
|
|
$ABRA app ls
|
|
|
|
|
|
|
|
$ABRA app ls -S
|