Skip to content

Commit daec992

Browse files
ci(audit-storage): onboard to testing-isolation (#4000)
* ci(audit-storage): onboard to testing-isolation Use ID_TOKEN from custard testing environment and set audience when deploying to Cloud Run * ci(audit-storage): move from dev to prod CI config --------- Co-authored-by: David Cavazos <[email protected]>
1 parent 746b039 commit daec992

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

.github/config/nodejs-dev.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
"endpoints/getting-started",
114114
"endpoints/getting-started-grpc",
115115
"error-reporting",
116+
"eventarc/audit-storage",
116117
"eventarc/generic",
117118
"eventarc/pubsub",
118119
"functions/concepts/afterResponse",

.github/config/nodejs-prod.jsonc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
"dialogflow-cx", // NOT_FOUND: com.google.apps.framework.request.NotFoundException: Agent 'undefined' does not exist
8787
"dlp", // [ERR_REQUIRE_ESM]: require() of ES Module
8888
"document-ai", // [ERR_REQUIRE_ESM]: require() of ES Module
89-
"eventarc/audit-storage", // (untested) Environment Variable 'SERVICE_NAME' not found
9089
"functions/billing", // (untested) Error: Request failed with status code 500
9190
"functions/imagemagick", // (untested) Error: A bucket name is needed to use Cloud Storage
9291
"functions/ocr/app", // (untested) Error: Bucket not provided. Make sure you have a "bucket" property in your request

eventarc/audit-storage/ci-setup.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"env" : {
3+
"SERVICE_NAME" : "eventarc-audit-storage",
4+
"CONTAINER_IMAGE" : "gcr.io/${PROJECT_ID}/run-${SERVICE_NAME}-${RUN_ID}"
5+
}
6+
}

eventarc/audit-storage/test/deploy.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ gcloud run deploy "${SERVICE_NAME}" \
3535
--region="${REGION:-us-central1}" \
3636
${FLAGS} \
3737
--platform=managed \
38+
--add-custom-audiences="https://action.test/" \
3839
--quiet
3940
set +x
4041

eventarc/audit-storage/test/runner.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ requireEnv() {
2020
test "${!1}" || (echo "Environment Variable '$1' not found" && exit 1)
2121
}
2222
requireEnv SERVICE_NAME
23+
requireEnv ID_TOKEN
2324

2425
echo '---'
2526
test/deploy.sh
@@ -40,7 +41,6 @@ function cleanup {
4041
trap cleanup EXIT
4142

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

4646
test -z "$BASE_URL" && echo "BASE_URL value is empty" && exit 1

0 commit comments

Comments
 (0)