Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

circle.yml: deploy on a personal hub account #1055

Merged
merged 1 commit into from
Feb 29, 2016

Conversation

alban
Copy link
Contributor

@alban alban commented Feb 28, 2016

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 adds a deployment target in circle.yml. It uses the
environment variable $DEPLOY_PRIVATE_HUB_BRANCH from my CircleCI
settings and any push on a branch with a name matching ".*master" (the
branch name must end with "master") will trigger the deployment.

This change should not impact the build of the official Scope Docker
image because $DEPLOY_PRIVATE_HUB_BRANCH is not defined in the official
CircleCI settings (https://circleci.com/gh/weaveworks/scope).

@tomwilkie
Copy link
Contributor

Hi @alban; I'd be tempted to update the hub target to work for you; protect it by a test -n "$DOCKERHUB_USER", drop the owner: weaveworks line and add the docker tag weaveworks/scope:latest $DOCKER_USER/scope:latest line. Then we can both use the same target.

@alban
Copy link
Contributor Author

alban commented Feb 29, 2016

@tomwilkie that's sound good to me as well. I'll try that.

@alban alban force-pushed the alban/build-2 branch 3 times, most recently from a463c9a to c99400e Compare February 29, 2016 15:58
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.
@alban
Copy link
Contributor Author

alban commented Feb 29, 2016

This new version seems to work for me.

tomwilkie added a commit that referenced this pull request Feb 29, 2016
circle.yml: deploy on a personal hub account
@tomwilkie tomwilkie merged commit 3e611f8 into weaveworks:master Feb 29, 2016
@alban
Copy link
Contributor Author

alban commented Feb 29, 2016

@tomwilkie did it get pushed to the correct place?
https://circleci.com/gh/weaveworks/scope/3254

The push refers to a repository [docker.io/tomwilkie/scope](len: 1)

@tomwilkie
Copy link
Contributor

mmm yes, it did not. I forgot circle has my credentials. We'll need another environment variable...

@alban
Copy link
Contributor Author

alban commented Mar 1, 2016

I'm preparing another PR to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants