forked from HHS/TANF-app
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
keeping make_erd job and commands definitions in separate folder
- Loading branch information
George Hudson
committed
Jul 31, 2023
1 parent
2a8a295
commit 04eedc9
Showing
6 changed files
with
75 additions
and
74 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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# commands: | ||
docker-compose-check: | ||
steps: | ||
- run: | ||
name: Ensure docker-compose exists, otherwise install it. | ||
command: ./scripts/docker-compose-check.sh | ||
|
||
docker-compose-up-backend: | ||
steps: | ||
- run: | ||
name: Build and spin-up Django API service | ||
command: cd tdrs-backend; docker network create external-net; docker-compose up -d --build | ||
|
||
cf-check: | ||
steps: | ||
- run: | ||
name: Ensure cf cli is installed, otherwise install it. | ||
command: sudo ./scripts/cf-check.sh | ||
|
||
# This allows us to use the orb stanza for node/install within other commands | ||
# NOTE: This doesn't work correctly on machine executors | ||
install-nodejs: node/install | ||
|
||
sudo-check: | ||
steps: | ||
- run: | ||
name: Ensure sudo is installed, otherwise install it. | ||
command: ./scripts/sudo-check.sh | ||
|
||
login-cloud-dot-gov: | ||
description: Authenticates with Cloud.gov and sets org and space targets | ||
parameters: | ||
cf-password: | ||
type: env_var_name | ||
default: CF_PASSWORD_DEV | ||
cf-org: | ||
type: env_var_name | ||
default: CF_ORG | ||
cf-space: | ||
type: string | ||
default: tanf-dev | ||
cf-username: | ||
type: env_var_name | ||
default: CF_USERNAME_DEV | ||
steps: | ||
- run: | ||
name: Login to Cloud.gov and set application targets | ||
command: | | ||
cf login -a https://api.fr.cloud.gov \ | ||
-u ${<<parameters.cf-username>>} \ | ||
-p ${<<parameters.cf-password>>} \ | ||
-o ${<<parameters.cf-org>>} \ | ||
-s <<parameters.cf-space>> |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# jobs: | ||
make_erd: | ||
executor: machine-executor | ||
working_directory: ~/tdp_apps | ||
steps: | ||
- checkout | ||
- docker-compose-check | ||
- run: | ||
name: Run graph_models | ||
command: | | ||
cd tdrs-backend | ||
if [ $(docker network inspect external-net 2>&1 | grep -c Scope) == 0 ]; then | ||
docker network create external-net | ||
fi | ||
docker-compose run --rm web bash -c \ | ||
"./manage.py graph_models -a -g -o tdp_erd.png" | ||
- store_artifacts: | ||
path: tdrs-backend/tdp_erd.png |