2020-12-19 05:12:20 +00:00
|
|
|
#!/usr/bin/env bash
|
2022-04-03 01:57:12 +00:00
|
|
|
set -euo pipefail
|
2020-12-19 05:12:20 +00:00
|
|
|
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P )
|
|
|
|
cd "$parent_path" || exit
|
|
|
|
|
|
|
|
./lint.sh
|
|
|
|
|
2021-06-22 00:04:11 +00:00
|
|
|
if [ 1 -eq "$#" ]
|
|
|
|
then
|
|
|
|
./version_bump.sh "$1"
|
|
|
|
else
|
|
|
|
./version_bump.sh
|
|
|
|
fi
|
2020-12-19 05:12:20 +00:00
|
|
|
|
2021-10-28 04:25:09 +00:00
|
|
|
# Download the package.json for caching
|
|
|
|
curl --silent 'https://git.tanshu.com/tanshu/barker/raw/tag/latest/bookie/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/barker/raw/tag/latest/barker/pyproject.toml' \
|
|
|
|
| sed 's/version = \"[0-9\.]*\"/version = "0.0.0"/g' \
|
|
|
|
> "$parent_path/docker/app/pyproject.toml"
|
|
|
|
|
2021-04-27 01:52:04 +00:00
|
|
|
cd "$parent_path/docker/app" || exit
|
2020-12-19 05:12:20 +00:00
|
|
|
docker build --tag barker:latest .
|
2022-04-26 03:33:10 +00:00
|
|
|
if [ 1 -eq "$#" ]
|
|
|
|
then
|
|
|
|
docker tag barker:latest "$1"
|
|
|
|
else
|
|
|
|
echo "No version bump"
|
|
|
|
fi
|
2021-03-17 04:09:56 +00:00
|
|
|
cd "$parent_path/docker" || exit
|
2022-04-26 03:33:10 +00:00
|
|
|
docker save barker:latest | bzip2 | pv | ssh tanshu@beacon.tanshu.com 'bunzip2 | sudo docker load'
|
|
|
|
ansible-playbook --limit=beacon playbook-mhl.yml
|
|
|
|
ansible-playbook --limit=beacon playbook-chd.yml
|
|
|
|
ansible-playbook --limit=beacon playbook-pkl.yml
|