Skip to content

Commit

Permalink
Merge pull request #1858 from kinvolk/alessandro/tcd-circleci
Browse files Browse the repository at this point in the history
circleci: push traffic control plugin image to docker hub
  • Loading branch information
jml authored Sep 13, 2016
2 parents d1cf9f6 + 66390c8 commit 801c419
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ test:
- test -z "$SECRET_PASSWORD" || (cd $SRCDIR/integration; eval $(./gce.sh hosts); ./run_all.sh):
parallel: true
timeout: 300
- cd $SRCDIR/examples/plugins/traffic-control && make .traffic-control.uptodate && docker tag weaveworks/scope-traffic-control-plugin weaveworks/scope-traffic-control-plugin:$(../../../tools/image-tag):
parallel: true
post:
- test -z "$SECRET_PASSWORD" || (cd $SRCDIR/integration; ./gce.sh destroy):
parallel: true
Expand All @@ -69,10 +71,14 @@ deployment:
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS &&
(test "${DOCKER_ORGANIZATION:-$DOCKER_USER}" == "weaveworks" || (
docker tag weaveworks/scope:latest ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:latest &&
docker tag weaveworks/scope:$(./tools/image-tag) ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:$(./tools/image-tag)
docker tag weaveworks/scope:$(./tools/image-tag) ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:$(./tools/image-tag) &&
docker tag weaveworks/scope-traffic-control-plugin:latest ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope-traffic-control-plugin:latest &&
docker tag weaveworks/scope-traffic-control-plugin:$(./tools/image-tag) ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope-traffic-control-plugin:$(./tools/image-tag)
)) &&
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope &&
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:$(./tools/image-tag) &&
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope-traffic-control-plugin &&
docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope-traffic-control-plugin:$(./tools/image-tag) &&
(test "${DOCKER_ORGANIZATION:-$DOCKER_USER}" != "weaveworks" || (
wcloud deploy -u circle weaveworks/scope:$(./tools/image-tag)
))
Expand Down
5 changes: 3 additions & 2 deletions examples/plugins/traffic-control/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

SUDO=$(shell docker info >/dev/null 2>&1 || echo "sudo -E")
EXE=traffic-control
IMAGE=weavescope-$(EXE)-plugin
IMAGE=weaveworks/scope-$(EXE)-plugin
NAME=weaveworks-scope-${EXE}-plugin
UPTODATE=.$(EXE).uptodate

run: $(UPTODATE)
Expand All @@ -13,7 +14,7 @@ run: $(UPTODATE)
--pid=host \
--privileged \
-v /var/run:/var/run \
--name $(IMAGE) $(IMAGE)
--name $(NAME) $(IMAGE)

$(UPTODATE): $(EXE) Dockerfile
$(SUDO) docker build -t $(IMAGE) .
Expand Down

0 comments on commit 801c419

Please sign in to comment.