30 lines
799 B
Bash
Executable File
30 lines
799 B
Bash
Executable File
#!/bin/bash
|
|
# Builds and deploys a stack with only what we need.
|
|
# This script assumes it is running in the project root.
|
|
|
|
set -e
|
|
|
|
laconic_so="${LACONIC_SO:-laconic-so} --stack $(readlink -f test) --verbose"
|
|
config_dir=$(readlink -f "${CONFIG_DIR:-$(mktemp -d)}")
|
|
|
|
# Prevent conflicting tty output
|
|
export BUILDKIT_PROGRESS=plain
|
|
|
|
# By default assume we are running in the project root
|
|
export CERC_REPO_BASE_DIR="${CERC_REPO_BASE_DIR:-..}"
|
|
# The debugger can swallow error messages on panic
|
|
echo CERC_REMOTE_DEBUG=false >> $config_dir/stack.env
|
|
|
|
set -x
|
|
|
|
if [[ -z $SKIP_BUILD ]]; then
|
|
$laconic_so setup-repositories
|
|
$laconic_so build-containers
|
|
else
|
|
$laconic_so fetch-containers --image-registry gitea.local:5555
|
|
fi
|
|
|
|
$laconic_so deploy \
|
|
--env-file $config_dir/stack.env \
|
|
--cluster test up
|