blob: 4a48ff1e175687fb13367e0519b01007a7e539e4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/usr/bin/env bash
set -eu
set -o pipefail
branch=${1:-main}
(cd /usr/local/share/puppet-tozt && sudo git remote update && sudo git checkout -B "$branch" && sudo git submodule update --init --recursive && sudo git reset --hard "origin/$branch")
set +e
sudo puppet apply --show_diff --modulepath=/usr/local/share/puppet-tozt/modules --hiera_config=/usr/local/share/puppet-tozt/hiera/hiera.yaml --detailed-exitcodes /usr/local/share/puppet-tozt/manifests
if [ $? -eq 2 ]; then
exit 0
else
exit $?
fi
|