-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ddo 3749 v2 update canary tests (#1635)
* Revert "Revert "[DDO-3749] use gsm instead of vault" (#1633)" This reverts commit 2648a79. * try copy before mount * copy r * copy r complex
- Loading branch information
1 parent
2648a79
commit f2c254a
Showing
4 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ set -e | |
set -x | ||
|
||
ENV=$1 | ||
VAULT_TOKEN=${2:-$(cat $HOME/.vault-token)} | ||
WORKING_DIR=${3:-$PWD} | ||
NEED_TOKEN=false | ||
|
||
|
@@ -17,7 +16,20 @@ else | |
echo "Starting canary test in Production" | ||
fi | ||
|
||
JSON_CREDS=`docker run --rm -e VAULT_TOKEN=$VAULT_TOKEN -e VAULT_ADDR=https://clotho.broadinstitute.org:8200 broadinstitute/dsde-toolbox vault read -format=json secret/dsde/firecloud/prod/common/canary/firecloud-account.json | jq '.data'` | ||
# the Jenkins config runs gcloud auth outside this script | ||
# we want to copy the global configs into the workspace so we don't affect other jobs that might be running on the node | ||
cp -r ${HOME}/.config/gcloud ${WORKSPACE}/gcloud_config | ||
|
||
DOCKER_ARGS=( | ||
"run" | ||
"--rm" | ||
"-v ${WORKSPACE}/gcloud_config:/root/.config/gcloud" | ||
"google/cloud-sdk" | ||
) | ||
|
||
SECRET_ACCESS_ACCOUNT=jenkins-firecloud@broad-dsp-techops.iam.gserviceaccount.com | ||
# Expand the array of args and pass them to `docker` | ||
JSON_CREDS=$(docker ${DOCKER_ARGS[*]} /bin/bash -c "gcloud config set account ${SECRET_ACCESS_ACCOUNT} && gcloud secrets versions access latest --project broad-dsde-dev --secret firecloud-sa") | ||
|
||
users=( | ||
[email protected] | ||
|
@@ -58,7 +70,7 @@ if [ $ENV = "prod" ]; then | |
|
||
do | ||
echo $i | ||
sleep 1m | ||
sleep 60 | ||
monitorSubmission [email protected] broad-firecloud-dsde CanaryTest $submissionId | ||
((i++)) | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"eventType":"CanaryTestProd","type":"Workflow","status": "Succeeded","timeToComplete (sec)":"253"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ set -e | |
set -x | ||
|
||
ENV=$1 | ||
VAULT_TOKEN=${2:-$(cat $HOME/.vault-token)} | ||
WORKING_DIR=${3:-$PWD} | ||
NEED_TOKEN=false | ||
|
||
|
@@ -18,7 +17,20 @@ else | |
echo "Starting complex workflow test in Production" | ||
fi | ||
|
||
JSON_CREDS=`docker run --rm -e VAULT_TOKEN=$VAULT_TOKEN -e VAULT_ADDR=https://clotho.broadinstitute.org:8200 broadinstitute/dsde-toolbox vault read -format=json secret/dsde/firecloud/prod/common/canary/firecloud-account.json | jq '.data'` | ||
# the Jenkins config runs gcloud auth outside this script | ||
# we want to copy the global configs into the workspace so we don't affect other jobs that might be running on the node | ||
cp -r ${HOME}/.config/gcloud ${WORKSPACE}/gcloud_config | ||
|
||
DOCKER_ARGS=( | ||
"run" | ||
"--rm" | ||
"-v ${WORKSPACE}/gcloud_config:/root/.config/gcloud" | ||
"google/cloud-sdk" | ||
) | ||
|
||
SECRET_ACCESS_ACCOUNT=jenkins-firecloud@broad-dsp-techops.iam.gserviceaccount.com | ||
# Expand the array of args and pass them to `docker` | ||
JSON_CREDS=$(docker ${DOCKER_ARGS[*]} /bin/bash -c "gcloud config set account ${SECRET_ACCESS_ACCOUNT} && gcloud secrets versions access latest --project broad-dsde-dev --secret firecloud-sa") | ||
|
||
users=( | ||
[email protected] | ||
|
@@ -59,7 +71,7 @@ if [ $ENV = "prod" ]; then | |
|
||
do | ||
echo $i | ||
sleep 5m | ||
sleep 300 | ||
monitorSubmission [email protected] broad-firecloud-dsde complex-featured-workflow $submissionId | ||
((i++)) | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters