From 40d2a07f3a1e6d50f667657bbfc2fdd876e37798 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Fri, 7 Apr 2017 09:42:22 -0400 Subject: [PATCH] 11332: Add /arvados/v1/repositories to token scope documentation of run-cwl-test.sh. Refactor into --scopes option. --- jenkins/run-cwl-test.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/jenkins/run-cwl-test.sh b/jenkins/run-cwl-test.sh index 085dbf0..d43a550 100755 --- a/jenkins/run-cwl-test.sh +++ b/jenkins/run-cwl-test.sh @@ -21,7 +21,11 @@ function usage { echo >&2 " --acct Account to log in with" echo >&2 " -d, --debug Enable debug output" echo >&2 " -h, --help Display this help and exit" + echo >&2 " -s, --scopes Print required scopes to run tests" echo >&2 +} + +function print_scopes { echo >&2 " Required scope for the token used to run the tests:" echo >&2 echo >&2 " arv api_client_authorization create_system_auth --scopes " @@ -49,13 +53,15 @@ function usage { echo >&2 "\"POST /arvados/v1/container_requests/\"," echo >&2 "\"GET /arvados/v1/containers\"," echo >&2 "\"GET /arvados/v1/containers/\"," + echo >&2 "\"GET /arvados/v1/repositories\"," + echo >&2 "\"GET /arvados/v1/repositories/\"," echo >&2 "\"GET /arvados/v1/logs\" ]" echo >&2 } # NOTE: This requires GNU getopt (part of the util-linux package on Debian-based distros). -TEMP=`getopt -o hdp: \ - --long help,debug,port:,acct: \ +TEMP=`getopt -o hdp:s \ + --long help,scopes,debug,port:,acct: \ -n "$0" -- "$@"` if [ $? != 0 ] ; then echo "Use -h for help"; exit 1 ; fi @@ -75,6 +81,10 @@ do DEBUG=1 shift ;; + -s | --scopes) + print_scopes + exit 0 + ;; --) shift break -- 2.39.5