There are two source checkouts in circle, and we were building in the wrong one
(ie. not the one where the earlier build happened). This was wasteful at best
and buggy at worst due to build differences.
After this patch, circleci builds the traffic control plugin image and
pushes it on docker hub. Rename traffic control plugin docker image
to "weaveworks/scope-traffic-control-plugin".
* Squashed 'tools/' changes from e9e7e6b..db5efc0
db5efc0 Merge pull request #28 from weaveworks/mike/add-image-tag
5312c40 Import image-tag script into build tools so it can be shared
7e850f8 Fix logs path
dda9785 Update deploy api
f2f4e5b Fix the wcloud client
3925eb6 Merge pull request #27 from weaveworks/wcloud-events
77355b9 Lint
d9a1c6c Add wcloud events, update flags and error nicely when there is no config
git-subtree-dir: tools
git-subtree-split: db5efc0537
* Remove ./image-tag and use ./tools/image-tag instead
image-tag is now shared code from the build-tools repo
After https://github.com/weaveworks/scope/commit/e2441623 "wcloud
deploy" is run in the main deploy unit guarded by the environment
variable. But the test makes it fail when it is not run under
"weaveworks".
* circle.yml: deploy master with non-upstream hub accounts
Since b4abe582f4, images are tagged on
Docker Hub. But this was not working for non-upstream Docker Hub
accounts. This patch should fix that.
Symptoms: https://circleci.com/gh/kinvolk/scope/23
> The push refers to a repository [docker.io/kinvolk/scope] (len: 1)
> error getting tags for kinvolk/scope: Tag does not exist for
> master-b89e9ec
Also, ensure that the Docker tag name does not include any '/'.
Symptoms: https://circleci.com/gh/kinvolk/scope/24
> docker tag weaveworks/scope weaveworks/scope:alban/hub1-ef739d9
> repository name component must match "[a-z0-9]+(?:[._-][a-z0-9]+)*"
* extras/in_parallel.sh: ensure unique schedule name
Use CircleCI environment variables as documented on:
https://circleci.com/docs/environment-variables/
Symptoms:
> $ cd $SRCDIR/extras; ./build_on_circle.sh
> Doing graphviz/graphviz
> make: *** No rule to make target `graphviz/graphviz'. Stop.
See: https://github.com/weaveworks/scope/pull/1655#issuecomment-232696357
* circle.yml: separate wcloud deployment
Do not run wcloud for non-weaveworks builds, as suggested by
https://github.com/weaveworks/scope/pull/1655#discussion_r71179373
By default, non-master branches are not deployed on the Docker Hub. With
this patch, you can enable this feature by setting the environment
variable DEPLOY_BRANCH in the circle configuration.
It will not be tagged with the "latest" tag but instead derive the tag
from the branch name. Since "/" are not allowed in Docker tag names, all
"/" are replaced by "-".
When testing code in Scope, I use circle to build the Docker image but I
don't want to always use my "master" branch for development.
With this patch, CircleCI will push by default to the Docker repository
$DOCKER_ORGANIZATION/scope. If $DOCKER_ORGANIZATION is not defined, it
will use $DOCKER_USER/scope.
I would to do some changes in Scope and test my changes in Kubernetes,
following the guide on:
https://github.com/weaveworks/scope#using-weave-scope-with-kubernetes
For that, I need a Docker image of Scope hosted on a Docker hub and
reference that Docker image in my Kubernetes resource yaml file. Instead
of building Scope on my laptop and pushing it manually on my Docker Hub
account, I am using my CircleCI account to do this automatically.
This patch fixes the deployment target in circle.yml. It uses the
environment variable $DOCKER_USER from the CircleCI settings to guard
against unintended deployment. As before, only the "master" branch will
trigger the deployment.
This change should not impact the build of the official Scope Docker
image.
Another call to gce.sh was added in commit abebb0f197 ("Build new test VM
(to pickup latest Docker version)") but without the guard on
$SECRET_PASSWORD. Add the guard to be able to test on CircleCI without
Weaveworks' credentials.
- Ensure we use up to date build container when running tests.
- Parallelise host setup for integration tests.
- Pass some more circle env vars through to ./tools/tests so the scheduler works.
- Gather coverage from multiple shards.
- Create files as the right owner inside the container.
- Parallelise the circle.yaml
- Parallelise the intergration tests using existing machinery
- Build experimental in parallel.
- Use custom scheduler prefix for integration tests, so schedules don't clash with weave.