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

Revert "bin/setup-circleci-secrets: possibly use generic credentials" #2229

Conversation

alban
Copy link
Contributor

@alban alban commented Feb 10, 2017

This reverts commit d0a5315.


The regression comes from #2223. I tried to fix it in #2225 but the PR is not yet ready. So meanwhile, this is to revert it.

/cc @2opremio

@2opremio 2opremio merged commit c179ce6 into weaveworks:master Feb 10, 2017
alban added a commit to kinvolk-archives/scope that referenced this pull request Feb 13, 2017
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 weaveworks#2223
Then, reverted in weaveworks#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.
alban added a commit to alban/scope that referenced this pull request Feb 14, 2017
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 weaveworks#2223
Then, reverted in weaveworks#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants