Skip to content

Commit

Permalink
Removed reference to .env.production and added instructions to retrie…
Browse files Browse the repository at this point in the history
…ve environment variables to the README
  • Loading branch information
jtwillis92 committed May 20, 2021
1 parent b768394 commit 450fead
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,30 @@ Which deployment environment within Cloud.gov the deploy job targets depends on
Note that the Production environment is omitted above, since `main` is a protected branch commits can't be made directly
to it so there is no path to be able to deploy straight to Production from labels on PRs.

#### Deploying from local environments
* NOTE: This only applies to deployments targeting the tanf-dev space.

In the case where a developer needs to make changes to the actual scripts used by Circle CI for deployments (found in
the /scripts folder at the root of this project) these scripts can also be run locally provided that
the developer has an active account in Cloud.gov and has been granted the "Developer" role.

You must first install the [Cloud Foundry CLI tool](https://docs.cloudfoundry.org/cf-cli/install-go-cli.html)

There are several environment variables that may be needed for the backend depending on the deployment strategy used
which must be kept secret and as such should not be stored anywhere outside of Cloud.gov / Circle CI. In order to
retrieve these values to supply to the deploy script you can use the following commands:
```
cf api https://api.fr.cloud.gov
cf login --sso
cf env tdp-backend
```
Before running your target script export any wanted variables from the output of that last command to your current shell
by running:
```
export MY_VAR=[VALUE]
```

#### Communication around Deployments

To prevent interrupting ongoing testing against a deployment environment it is important to always communicate with the Team
Expand Down
5 changes: 1 addition & 4 deletions scripts/set-backend-env-vars.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@

set -o allexport
[[ -f ./tdrs-backend/.env.production ]] && source ./tdrs-backend/.env.production
set +o
#!/usr/bin/env bash

CGAPPNAME_BACKEND=$1

Expand Down

0 comments on commit 450fead

Please sign in to comment.