-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: handle BOT_NAME and BOT_LOCATION configuration via env (#5583)
Handle better env var names (GCF_SHORT_FUNCTION_NAME -> BOT_NAME and GCF_LOCATION -> BOT_LOCATION) fix: ensure that Cloud Function URL uses underscored name of bot test: fix test at runtime, not docker build time test: set test env variables at runtime not build time
- Loading branch information
Showing
4 changed files
with
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,32 @@ | ||
steps: | ||
- name: 'gcr.io/cloud-builders/docker' | ||
args: [ 'build', '--network=cloudbuild', '-t', 'test-result', '-f', 'packages/gcf-utils/Dockerfile', '.'] | ||
id: build | ||
dir: packages/gcf-utils | ||
args: | ||
- 'build' | ||
- '--network=cloudbuild' | ||
- '-t' | ||
- 'test-image' | ||
- '-f' | ||
- 'Dockerfile' | ||
- '.' | ||
- name: test-image | ||
waitFor: ['build'] | ||
dir: /code | ||
env: | ||
- 'PROJECT_ID=$PROJECT_ID' | ||
- 'GCF_SHORT_FUNCTION_NAME=snippet_bot' | ||
- 'INSTALLATION_ID=9602930' | ||
- 'GCF_LOCATION=us-central1' | ||
|
||
- name: test-image | ||
waitFor: ['build'] | ||
dir: /code | ||
env: | ||
- 'PROJECT_ID=$PROJECT_ID' | ||
- 'BOT_NAME=snippet_bot' | ||
- 'INSTALLATION_ID=9602930' | ||
- 'BOT_LOCATION=us-central1' | ||
|
||
options: | ||
logging: CLOUD_LOGGING_ONLY |
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