Commit Graph

48 Commits

Author SHA1 Message Date
Bryan Boreham
b438707a92 Clean up lint errors in shell scripts 2020-12-30 18:30:34 +00:00
Bryan Boreham
7a9c5142f5 Don't quote RELEASE_ARGS which may contain two arguments
If it is "--draft --pre-release" then we need to pass that unquoted so
it is seen as two arguments.
2020-04-10 17:39:47 +00:00
Bryan Boreham
2ebbb1cb10 Remove quay.io from release script 2019-07-31 13:21:40 +00:00
Roberto Bruggemann
be5f216342 Tag images at build time
`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.
2017-12-15 10:27:54 +00:00
Matthias Radestock
2cd8b3388f add 'realclean' make target to clear out container images
...and use that in bin/release, so that we don't build releases with
ancient images.
2017-07-30 07:16:39 +01:00
Matthias Radestock
e954cb8328 refactor: remove duplication 2017-07-28 14:48:39 +01:00
Matthias Radestock
561a2118cf push release images to quay.io
Fixes #2762.
2017-07-28 14:13:05 +01:00
Alfonso Acosta
98395bb595 Create cloud agent image (#2284)
* Create cloud-agent image

* Refactor Makefile

* Push the image from CircleCI and releases

* Review feedback

* Review feedback

* Review feedback
2017-02-27 17:49:26 +01:00
Alban Crequy
e031728b04 bin/setup-circleci-secrets: possibly use generic credentials
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.
2017-02-21 17:19:18 +01:00
jpellizzari
a470704b73 Change to release script tag check to numeric equality 2017-02-16 10:34:33 -08:00
Alban Crequy
beec651cd7 Revert "bin/setup-circleci-secrets: possibly use generic credentials"
This reverts commit d0a5315c5c.
2017-02-10 20:17:02 +01:00
Alban Crequy
d0a5315c5c bin/setup-circleci-secrets: possibly use generic credentials
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.
2017-02-09 17:42:36 +01:00
Alfonso Acosta
86528281e7 Fix release shell script bug
Introduced by 43d9f38c5e and found during release
2017-02-08 23:07:20 +00:00
Alfonso Acosta
14a555ffab Stop using tag -f
(It's been removed from Docker)
2017-02-08 17:10:50 +00:00
Alfonso Acosta
7acebad756 Push latest_release tag to Docker Hub on each release 2017-02-08 17:02:14 +00:00
Iago López Galeiras
5cb5c7d42e Fix shfmt issues 2017-01-18 11:51:41 +01:00
Iago López Galeiras
43d9f38c5e Fix various linter issues
Found via shellcheck.
2017-01-18 11:51:41 +01:00
David Kaltschmidt
2698941956 Use GNU wc on Darwin 2016-02-29 15:05:19 +01:00
Tom Wilkie
58a1528ba6 Make bin/release work on a mac. 2016-01-29 14:15:06 -08:00
David Kaltschmidt
271bcbde19 Correct path for scope version command 2015-12-15 12:07:47 +01:00
Tom Wilkie
bcd346ab5b Release script should use make tests to run tests. 2015-11-03 17:25:39 +00:00
Peter Bourgon
4a7a7a6dda Another fix from the old release script 2015-10-01 10:54:24 -04:00
Peter Bourgon
79356100d7 We don't 'make test', we do something else 2015-10-01 10:44:13 +02:00
Peter Bourgon
6744a3677f Latest bin/release script from weave repo 2015-10-01 10:00:21 +02:00
Paul Bellamy
fc75b3dc58 fixing bin/release 2015-08-19 10:22:31 +01:00
Tom Wilkie
efeba4a2ed Use rebuild-image script from tools.git
- Add some extra files to build image
- Add make to UI build container
2015-08-17 16:26:06 +00:00
Tom Wilkie
3a1f376c29 Use tools.git 2015-08-17 16:26:04 +00:00
David Kaltschmidt
988e2e05d7 Renamed app to scope-app in release script 2015-07-16 16:38:43 +02:00
Peter Bourgon
ac29fba7bc Don't fail if CACHE_DIR has a missing component
Also, don't invoke weave if it's not running.
2015-07-13 16:03:19 +02:00
Tom Wilkie
cf261282e2 Detect when to rebuild cached build image. 2015-07-08 15:43:48 +00:00
Tom Wilkie
d2d73c3cd4 Add -cpu 4 to tests. 2015-07-06 15:07:33 +00:00
Paul Bellamy
08f62aa4cb Merge pull request #273 from paulbellamy/integration-tests
First pass at integration tests
2015-07-03 09:55:37 +01:00
Peter Bourgon
90a0286909 Refactor tests to have appropriate packages
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.
2015-06-29 18:06:44 +02:00
Paul Bellamy
ff9771f112 initial integration test setup
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.
2015-06-29 15:40:40 +01:00
Tom Wilkie
3daea81890 Merge pull request #252 from tomwilkie/208-test
Don't calculate coverage metrics in bin/test by default.
2015-06-17 18:35:59 +02:00
Tom Wilkie
48a75cdc76 Don't caclulate coverage metrics in bin/test by default. 2015-06-17 14:57:36 +00:00
Tom Wilkie
617106829a Add simple spellchecking to linter. 2015-06-17 10:16:43 +00:00
Peter Bourgon
dcb23a517a bin/release: fix sed invocation 2015-06-15 12:49:47 +02:00
Tom Wilkie
bd9865f217 Introduce ./bin/test -slow, run by circle. Allow developers to run faster tests. 2015-06-10 15:54:09 +00:00
Tom Wilkie
20618a16c7 Start testing with the race detector. 2015-06-08 15:01:01 +00:00
Tom Wilkie
b858f76a40 Ignore releases/ directory. 2015-06-02 16:03:07 +00:00
Tom Wilkie
2d430895e3 Plumbing for releases stolen straight from weave. 2015-06-01 15:17:32 +00:00
Tom Wilkie
924c8b84e6 Add errcheck to our bin/test script (doesn't fit well with lint) 2015-05-26 15:43:17 +00:00
Tom Wilkie
f11168c051 Make bin/test download test dependancies. 2015-05-22 15:02:36 +00:00
Tom Wilkie
4c3912edf0 Add lint script; run it on circle. Intentionally don't lint static.go. 2015-05-19 10:43:04 +00:00
Peter Bourgon
578b6dfcba Don't test experimental stuff 2015-05-19 10:05:05 +00:00
Peter Bourgon
2ba9dab7bd integration: becomes experimental; remove support in bin/test 2015-05-19 10:05:05 +00:00
Tom Wilkie
4598d37ecd Add circle ci config and test script. 2015-05-19 10:05:04 +00:00