From eafff0766891b481567ddac2f3092a0c3b82ee2e Mon Sep 17 00:00:00 2001 From: KeisukeYamashita <19yamashita15@gmail.com> Date: Mon, 17 Jan 2022 14:43:42 +0900 Subject: [PATCH] Fix region user defined substitution format Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com> --- ci.go | 2 +- ci_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci.go b/ci.go index e7a6f9e..2719296 100644 --- a/ci.go +++ b/ci.go @@ -155,7 +155,7 @@ func cloudbuild() (ci CI, err error) { ci.PR.Number = 0 ci.PR.Revision = os.Getenv("COMMIT_SHA") - region := os.Getenv("REGION") + region := os.Getenv("_REGION") if region == "" { region = defaultCloudBuildRegion } diff --git a/ci_test.go b/ci_test.go index 9313e11..1bf7e34 100644 --- a/ci_test.go +++ b/ci_test.go @@ -791,7 +791,7 @@ func TestCloudBuild(t *testing.T) { os.Setenv("BUILD_ID", "build-id") os.Setenv("PROJECT_ID", "gcp-project-id") os.Setenv("_PR_NUMBER", "123") - os.Setenv("REGION", "asia-northeast1") + os.Setenv("_REGION", "asia-northeast1") }, ci: CI{ PR: PullRequest{ @@ -808,7 +808,7 @@ func TestCloudBuild(t *testing.T) { os.Setenv("BUILD_ID", "build-id") os.Setenv("PROJECT_ID", "gcp-project-id") os.Setenv("_PR_NUMBER", "") - os.Setenv("REGION", "") + os.Setenv("_REGION", "") }, ci: CI{ PR: PullRequest{