Adding initial GitHub Actions
This commit is contained in:
17
scripts/decrease-runners-tmc.sh
Executable file
17
scripts/decrease-runners-tmc.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
|
||||
SCDIR=$(realpath $SCDIR)
|
||||
|
||||
function count_runners() {
|
||||
kubectl get pods --namespace default | grep Running | grep -c "runners-ci"
|
||||
}
|
||||
|
||||
if [ "$1" = "" ]; then
|
||||
echo "Expected number to decrease"
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p $HOME/.kube
|
||||
echo "Connecting to stream-apps-gh-runners"
|
||||
tmc cluster auth kubeconfig get stream-apps-gh-runners > $HOME/.kube/runners-config
|
||||
export KUBECONFIG=$HOME/.kube/runners-config
|
||||
$SCDIR/decrease-runners.sh $*
|
||||
Reference in New Issue
Block a user