Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(eventarc): onboard pubsub sample to testing isolation #3988

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/config/nodejs-prod.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
".kokoro/",
".prettierignore",
".prettierrc.js",
"cloud-samples-tools", // checked out by GH action in ci-*.yml
"cloud-samples-tools", // checked out by GH action in ci-*.yml
"CODEOWNERS",
"CODE_OF_CONDUCT.md",
"CONTRIBUTING.md",
Expand Down Expand Up @@ -84,7 +84,6 @@
"dlp", // [ERR_REQUIRE_ESM]: require() of ES Module
"document-ai", // [ERR_REQUIRE_ESM]: require() of ES Module
"eventarc/audit-storage", // (untested) Environment Variable 'SERVICE_NAME' not found
"eventarc/pubsub", // (untested) Environment Variable 'SERVICE_NAME' not found
"functions/billing", // Error: Request failed with status code 500
"functions/http/uploadFile", // npm error Missing script: "test"
"functions/imagemagick", // Error: A bucket name is needed to use Cloud Storage
Expand Down
6 changes: 6 additions & 0 deletions eventarc/pubsub/ci-setup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"env": {
"SERVICE_NAME": "eventarc-pubsub-$RUN_ID",
"CONTAINER_IMAGE": "gcr.io/long-door-651/eventarc-pubsub:${RUN_ID}"
}
}
2 changes: 2 additions & 0 deletions eventarc/pubsub/test/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ requireEnv() {
test "${!1}" || (echo "Environment Variable '$1' not found" && exit 1)
}
requireEnv SERVICE_NAME
requireEnv CONTAINER_IMAGE

echo '---'
test/deploy.sh
Expand All @@ -40,6 +41,7 @@ function cleanup {
trap cleanup EXIT

# TODO: Perform authentication inside the test.
gcloud auth list
export ID_TOKEN=$(gcloud auth print-identity-token)
export BASE_URL=$(test/url.sh)

Expand Down
Loading