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

test: fix build script bash error #1697

Merged
merged 1 commit into from Sep 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions internal/kokoro/test.sh
Expand Up @@ -12,13 +12,13 @@ export GOOGLE_CLOUD_PROJECT="dulcet-port-762"
export GCLOUD_TESTS_IMPERSONATE_READER_KEY="${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-impersonate-reader-service-account"
export GCLOUD_TESTS_IMPERSONATE_READER_EMAIL="impersonate-reader@${GOOGLE_CLOUD_PROJECT}.iam.gserviceaccount.com"
export GCLOUD_TESTS_IMPERSONATE_WRITER_EMAIL="impersonate-writer@${GOOGLE_CLOUD_PROJECT}.iam.gserviceaccount.com"
export GCLOUD_TESTS_GOLANG_PROJECT_NUMBER=`cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-project-number`
export GCLOUD_TESTS_GOLANG_SERVICE_ACCOUNT_CLIENT_ID=`cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-client-id`
export GCLOUD_TESTS_GOLANG_AWS_ACCOUNT_ID=`cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aws-acc-id`
export GCLOUD_TESTS_GOLANG_AWS_ROLE_NAME=`cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aws-role-name`
export GCLOUD_TESTS_GOLANG_PROJECT_NUMBER=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-project-number)
export GCLOUD_TESTS_GOLANG_SERVICE_ACCOUNT_CLIENT_ID=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-client-id)
export GCLOUD_TESTS_GOLANG_AWS_ACCOUNT_ID=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aws-acc-id)
export GCLOUD_TESTS_GOLANG_AWS_ROLE_NAME=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aws-role-name)
export GCLOUD_TESTS_GOLANG_AWS_ROLE_ID="arn:aws:iam::$GCLOUD_TESTS_GOLANG_AWS_ACCOUNT_ID:role/$GCLOUD_TESTS_GOLANG_AWS_ROLE_NAME"
export GCLOUD_TESTS_GOLANG_AUDIENCE_OIDC=`cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aud-oidc`
export GCLOUD_TESTS_GOLANG_AUDIENCE_AWS=`cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aud-aws`
export GCLOUD_TESTS_GOLANG_AUDIENCE_OIDC=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aud-oidc)
export GCLOUD_TESTS_GOLANG_AUDIENCE_AWS=$(cat ${KOKORO_GFILE_DIR}/secret_manager/go-cloud-integration-byoid-aud-aws)
export GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES="1"

# Display commands being run
Expand Down Expand Up @@ -61,10 +61,10 @@ if [[ $KOKORO_JOB_NAME == *"continuous"* ]]; then
# xUnit XML file.
cat $KOKORO_ARTIFACTS_DIR/$KOKORO_GERRIT_CHANGE_NUMBER.txt |
go-junit-report -set-exit-code >sponge_log.xml
exit_code=$($?)
exit_code=$(($exit_code + $?))
else
go test -race -v -short ./... 2>&1 | tee $KOKORO_ARTIFACTS_DIR/$KOKORO_GERRIT_CHANGE_NUMBER.txt
exit_code=$($?)
exit_code=$(($exit_code + $?))
fi

if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then
Expand Down