`push_images` used to tag and publish the latest built image, no matter what version or what branch or tag was checked out.
Since `bin/release build` and `bin/release publish` can be run at different times, it was possible for the latest built image to change. At which point `bin/release publish` would tag and publish an intended image.
Moving image tagging at build time will prevent this from happening again.
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.
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.
By default, tests should be in package pkg_test. If they need to test
package internals, they can be in package pkg, but then should carry a
suffix of foo_internal_test.go.
This changeset enforces that idiom across the codebase, and adds a check
to the linter to make sure it remains.
Also, some fixes to comments.
Integration tests are only run on circle. They checkout the weave
project, and use test helpers from there.
There are just a few basic tests for now, to confirm it works.