Skip to content
This repository has been archived by the owner on Mar 5, 2025. It is now read-only.

Commit

Permalink
Merge pull request #10 from broadinstitute/fb-DR-977-refactor-iam-cle…
Browse files Browse the repository at this point in the history
…anup

Minor refactor of IAM policy cleanup
  • Loading branch information
fboulnois authored May 14, 2020
2 parents 63244c5 + c9d4d82 commit bbb3b2e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gradleinttest.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

cleaniampolicy () {
eval $(cat env_vars)
# determine id of integration project
namespace_number=$(echo ${NAMESPACEINUSE} | sed 's/integration-//g')
google_data_project="broad-jade-int-${namespace_number}-data"
echo "running clean IAM policy function"
echo "Cleaning up IAM policy for data project: ${google_data_project}"

# get the policy bindings for the project
echo "Data project to be cleaned: $google_data_project"
bindings=$(gcloud projects get-iam-policy ${google_data_project} --format=json)

# get the members of the BigQuery Job User role
Expand Down Expand Up @@ -37,11 +37,11 @@ gradleinttest () {
export GOOGLE_CLOUD_PROJECT=${google_project}
if [[ "${test_to_run}" == "testIntegration" ]]; then
echo "Running integration tests against ${IT_JADE_API_URL}"
cleaniampolicy
fi
pg_isready -h ${PGHOST} -p ${PGPORT}
psql -U postgres -f ./db/create-data-repo-db
# required for tests
cleaniampolicy
./gradlew assemble
./gradlew check --scan
./gradlew ${test_to_run} --scan
Expand Down

0 comments on commit bbb3b2e

Please sign in to comment.