Files
triggershell/examples/scripts/deploy.sh
T

28 lines
558 B
Bash
Raw Normal View History

2026-08-15 18:37:30 +02:00
#!/usr/bin/env bash
set -euo pipefail
env=""
replicas=""
dry_run="false"
while [[ $# -gt 0 ]]; do
case "$1" in
--env) env="$2"; shift 2 ;;
--replicas) replicas="$2"; shift 2 ;;
--dry-run) dry_run="true"; shift ;;
*) echo "unknown argument: $1" >&2; exit 1 ;;
esac
done
echo "Deploying to '${env}' with ${replicas} replicas (dry_run=${dry_run})"
if [[ -n "${SLACK_CHANNEL:-}" ]]; then
echo "Would notify Slack channel: ${SLACK_CHANNEL}"
fi
for i in $(seq 1 5); do
echo "[${i}/5] working..."
sleep 1
done
echo "Deploy complete."