Skip to content

Commit

Permalink
circle.yml: deploy on a personal hub account
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alban committed Feb 29, 2016
1 parent 63a07e1 commit a463c9a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ test:
deployment:
hub:
branch: master
owner: weaveworks
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push weaveworks/scope
- >
test -z "${DOCKER_USER}" || (
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS &&
(test "${DOCKER_USER}" == "weaveworks" || docker tag weaveworks/scope:latest $DOCKER_USER/scope:latest) &&
docker push weaveworks/scope
)

0 comments on commit a463c9a

Please sign in to comment.