brewman/deploy.sh

34 lines
1.1 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
set -e
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P )
cd "$parent_path" || exit
#./lint.sh
if [ 1 -eq "$#" ]
then
./version_bump.sh "$1"
else
./version_bump.sh
fi
# Download the package.json for caching
curl --silent 'https://git.tanshu.com/tanshu/brewman/raw/tag/latest/overlord/package.json' \
| sed 's/\"version\": \"[0-9\.]*\"/"version": "0.0.0"/g' \
> "$parent_path/docker/app/package.json"
# Download the package.json for caching
curl --silent 'https://git.tanshu.com/tanshu/brewman/raw/tag/latest/brewman/pyproject.toml' \
| sed 's/version = \"[0-9\.]*\"/version = "0.0.0"/g' \
> "$parent_path/docker/app/pyproject.toml"
cd "$parent_path/docker/app" || exit
docker build --tag brewman:latest .
cd "$parent_path/docker" || exit
2022-01-06 11:24:16 +00:00
docker save brewman:latest | bzip2 | pv | ssh vancity 'bunzip2 | sudo docker load'
ansible-playbook --limit vancity playbook-exp.yml
ansible-playbook --limit vancity playbook-hops.yml
ansible-playbook --limit vancity playbook-acc.yml
ansible-playbook --limit vancity playbook-mhl.yml