-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci/cd: add option in workflow to skip image rebuild in deployment (#68)
- Loading branch information
1 parent
19c0874
commit 0e9f2d3
Showing
9 changed files
with
88 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,30 @@ | ||
#!/bin/bash | ||
|
||
ansible-playbook app/deploy-images.yaml -i inventory.yaml | ||
usage() { | ||
echo "Usage: $0 [--skip-rebuild-images=true|false]" | ||
exit 1 | ||
} | ||
|
||
SKIP_REBUILD_IMAGES="true" # Skip rebuilding images by default | ||
|
||
if [[ $# -gt 1 ]]; then | ||
usage | ||
elif [[ $# -eq 1 ]]; then | ||
case "$1" in | ||
--skip-rebuild-images=true) | ||
SKIP_REBUILD_IMAGES="true" | ||
;; | ||
--skip-rebuild-images=false) | ||
SKIP_REBUILD_IMAGES="false" | ||
;; | ||
*) | ||
echo "Invalid argument: $1" | ||
usage | ||
;; | ||
esac | ||
fi | ||
|
||
if [[ "${SKIP_REBUILD_IMAGES}" == "false" ]]; then | ||
ansible-playbook app/deploy-images.yaml -i inventory.yaml | ||
fi | ||
CHROMADB_HOST=$(cat chromadb/.instance-ip) ansible-playbook app/deploy-k8s.yaml -i inventory.yaml --extra-vars cluster_state=present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
cd chromadb | ||
terraform init | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,30 @@ | ||
#!/bin/bash | ||
|
||
ansible-playbook pipeline/deploy-images.yaml -i inventory.yaml | ||
usage() { | ||
echo "Usage: $0 [--skip-rebuild-images=true|false]" | ||
exit 1 | ||
} | ||
|
||
SKIP_REBUILD_IMAGES="true" # Skip rebuilding images by default | ||
|
||
if [[ $# -gt 1 ]]; then | ||
usage | ||
elif [[ $# -eq 1 ]]; then | ||
case "$1" in | ||
--skip-rebuild-images=true) | ||
SKIP_REBUILD_IMAGES="true" | ||
;; | ||
--skip-rebuild-images=false) | ||
SKIP_REBUILD_IMAGES="false" | ||
;; | ||
*) | ||
echo "Invalid argument: $1" | ||
usage | ||
;; | ||
esac | ||
fi | ||
|
||
if [[ "${SKIP_REBUILD_IMAGES}" == "false" ]]; then | ||
ansible-playbook pipeline/deploy-images.yaml -i inventory.yaml | ||
fi | ||
./pipeline/pipeline.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/bash | ||
|
||
CHROMADB_HOST=$(cat chromadb/.instance-ip) | ||
|
||
ansible-playbook app/deploy-k8s.yaml -i inventory.yaml --extra-vars cluster_state=absent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
cd chromadb | ||
terraform init | ||
|
||
|