-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
CI: Publish tags to Dockerhub #1743
Conversation
@bndw I'm not totally sure how this will work. The tag will definitely not exist when the initial master build is done. Perhaps we can do some type of "deploy" action. I will look at the Circle docs. |
@mattklein123 Agreed, the tag event would be a separate webhook from Github. It looks like the deploy action is the right place to do this with CircleCI; here's an example from the docs:
workflows:
version: 2
build-n-deploy:
jobs:
- build:
filters:
tags:
only: /^config-test.*/
- test:
requires:
- build
filters:
tags:
only: /^config-test.*/
- deploy:
requires:
- test
filters:
tags:
only: /^config-test.*/
branches:
ignore: /.*/ In order to get this working I think we'd need the |
ci/docker_push.sh
Outdated
@@ -20,6 +20,12 @@ then | |||
docker push lyft/envoy:latest | |||
docker tag lyft/envoy:latest lyft/envoy:$CIRCLE_SHA1 | |||
docker push lyft/envoy:$CIRCLE_SHA1 | |||
if [ -z "$CIRCLE_TAG" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you want -n
(test that the string is non-zero length) as opposed to -z
(tests for zero length string).
@bndw I'm definitely not opposed to this and it would be pretty cool, but I've invested as much time as I can on CI for right now so won't be able to take a look. If you want to sort through docs and try to figure out how to make this work definitely interested. |
@mattklein123 This should be working now. In order to turn on tag support, we added
I've setup a test Github Repo, CircleCI project, and Dockerhub repository to test this all out. If you take a look at #32 and #34 you can see both the commit event building and pushing images and the tag event pulling, tagging, and pushing images, respectively. EDIT: Sorry, it looks like when I tried to rebase my fork it added all the recent changes to this PR. Is there a work around for this so the PR is actually readable? |
@bndw just squash/rebase on master and force push with DCO. It's a small PR. We can review the final version. Thanks for working on this! |
4b356dc
to
ac4375f
Compare
Signed-off-by: bndw <benjamindwoodward@gmail.com>
@mattklein123 Rebased. It seems I broke the |
I don't actually understand what the bot keys on. I think it might key on the email attached to your account but I'm not sure? @caniszczyk? |
https://patch-diff.githubusercontent.com/raw/envoyproxy/envoy/pull/1743.patch Add "bndw benwoodward@boaweb.com" as a valid email to your GitHub profile and you should be set. |
@caniszczyk Just checked and that's an existing, secondary email on my Github profile 😬 |
It looks like the |
@bndw I don't think it looks at other commits, just the ones now in this PR since you squashed it. It must not be looking at secondary emails? Can you just resign the commit with the boaweb one? |
@mattklein123 I'd strongly prefer to have this contribution associated with the gmail account, and that's the account the single commit is signed with:
Perhaps opening a new PR would reset the check? |
I don't think that's the problem but sure let's try that. |
Closing this PR to open a new one, with the idea that the DCO bot is hung up on a previously use email address for the sign-off. |
hiya! Jumping in from over at probot/dco. The check that we do is merely to make sure that your commit was signed with what
I could not sign the commit A solution can be to rebase with the correct email in your git config settings and sign off again. |
Signed-off-by: Mike Schore <mike.schore@gmail.com> Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: Mike Schore <mike.schore@gmail.com> Signed-off-by: JP Simard <jp@jpsim.com>
Creates a tag in Dockerhub for git tags. Unfortunately, I'm not sure how to test this and it may require an update to
.circleci/config.yml
to explicitly set thebuild_image
job to run on tags.Implements #1742