-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci.sh
executable file
·58 lines (50 loc) · 856 Bytes
/
ci.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
deploy() {
docker compose run --rm gcp-training-ci deploy
}
destroy() {
docker compose run --rm gcp-training-ci destroy
}
build() {
docker compose build
}
list() {
docker compose run --rm gcp-training-ci list
}
show() {
docker compose run --rm gcp-training-ci show -- $1
}
output() {
docker compose run --rm gcp-training-ci output -- $1
}
help() {
echo "Usage: ci <command>"
echo
echo "Available commands:"
echo " build - Builds the CI docker image"
echo " deploy - Deploys the terraform stack"
echo " destroy - Destroys the terraform stack"
}
case "$1" in
build)
build
;;
deploy)
deploy
;;
destroy)
destroy
;;
list)
list
;;
show)
show $2
;;
output)
output $2
;;
*)
echo "Unknown command. Use 'ci help' for available commands."
;;
esac