mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 10:11:03 +00:00
If the $SECRET_SCRIPT environment variable is defined in CircleCI, this can override the GCE credentials. I now use "base64" instead of "openssl base64" in order to support long lines in base64 text. It's useful when the text comes from a long environment variable like $SECRET_SCRIPT defined in CircleCI. Also, the $PROJECT environment variable can now override the GCE project name. Before, it needed to be named scope-integration-tests. This was initially merged in https://github.com/weaveworks/scope/pull/2223 Then, reverted in https://github.com/weaveworks/scope/pull/2229 Since then, it has the following fixes: 1. fix shell "unbound variable" Since this shell script uses "set -u", we must not use unset variables directly. Symptoms: > https://circleci.com/gh/weaveworks/scope/6384 > bin/setup-circleci-secrets: line 10: SECRET_SCRIPT: unbound variable Instead, we should use the parameter expansion "+" to test if the variable is set. See: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02 2. return value of read I use the builtin "read" and this returns a non-zero value when reading until EOF. I use "|| true" to accept that.