@@ -72,10 +72,6 @@ for dir in `find 'packages' -type d -wholename 'packages/*/tests/system' -o -who
7272 # google-auth specific service account credentials.
7373 export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR} /google-auth-service-account.json
7474
75- # Activate gcloud with service account credentials
76- gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS
77- gcloud config set project ${PROJECT_ID}
78-
7975 # google-auth specific system test noxfile
8076 export NOX_FILE=" system_tests/noxfile.py"
8177
@@ -103,10 +99,6 @@ for dir in `find 'packages' -type d -wholename 'packages/*/tests/system' -o -who
10399 # Fallback/Default service account credentials.
104100 export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR} /service-account.json
105101
106- # Activate gcloud with service account credentials
107- gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS
108- gcloud config set project ${PROJECT_ID}
109-
110102 # Fallback/Default noxfile.py
111103 export NOX_FILE=" noxfile.py"
112104
@@ -131,6 +123,11 @@ for dir in `find 'packages' -type d -wholename 'packages/*/tests/system' -o -who
131123 else
132124 echo " change detected in ${files_to_check} "
133125 echo " Running system tests for ${package_name} "
126+
127+ # Activate gcloud with service account credentials
128+ gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS
129+ gcloud config set project ${PROJECT_ID}
130+
134131 pushd ${package_path}
135132 # Temporarily allow failure.
136133 set +e
0 commit comments