File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,16 @@ Add `--no-dry-run` to actually trigger the jobs; that path also needs
4646` CF_API_URL ` , ` CF_SERVICE_USER ` , and ` CF_SERVICE_AUTH ` set, since it uses
4747` CFHandler ` to throttle against ` HARVEST_RUNNER_MAX_TASKS ` .
4848
49+ These are already set on the deployed app, so pull them from there instead of
50+ hunting for the underlying service account credentials. ` cf env ` prints them
51+ in two different shapes (` CF_API_URL ` as a flat ` KEY: value ` line,
52+ ` CF_SERVICE_USER ` /` CF_SERVICE_AUTH ` as quoted JSON fields), so a plain
53+ ` grep ` /` export ` won't catch all three:
54+
55+ ``` bash
56+ eval " $( cf env datagov-harvest | grep -E ' "?(CF_API_URL|CF_SERVICE_USER|CF_SERVICE_AUTH)"?:' | sed -E ' s/^[[:space:]]*"?([A-Z_]+)"?:[[:space:]]*"?([^",]*)"?,?$/export \1="\2"/' ) "
57+ ```
58+
4959### Connecting to the prod database
5060
5161cloud.gov databases aren't reachable directly from a local machine, so you
You can’t perform that action at this time.
0 commit comments