- Notifications
You must be signed in to change notification settings - Fork8
Tag and Push to Docker Hub#3
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@wfleming I need help setting up those |
codeclimate/patrick pull || true | ||
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" -e "$DOCKER_EMAIL" | ||
- docker pull "codeclimate/codeclimate-pmd:${CIRCLE_BRANCH//\//-}" || docker pull codeclimate/codeclimate-pmd || true | ||
- git rev-parse HEAD > REVISION |
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 don't think you need this or line 11: we use these attrs in web services for error reporting & some status endpoints, but I don't think you'll make use of them in this engine.
- make image | ||
test: | ||
override: | ||
- make test | ||
deployment: | ||
registry: | ||
release: | ||
branch: master |
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.
This is a bit of a stumbling block for Circle CI: I believe it will only executeonedeployment
block, basically whichever one gets matched first.
So I think the config you have right now will only push:latest
onmaster
, and nothing else.
We also do want at least branch builds forall branches, not just release channels.
One thing I think we've ended up doing a few places because it can get repetitive to separate the logic out within thecircle.yml
is to just execute something like abin/deploy.sh
on all branches:
#!/bin/shset -eIMAGE_NAME="codeclimate/codeclimate-pmd"if [ "$CIRCLE_BRANCH" = "master" ]; then docker push "$IMAGE_NAME"fipush_build_num() { docker tag "$IMAGE_NAME" "$IMAGE_NAME:$CIRCLE_BUILD_NUM" docker push "$IMAGE_NAME:$CIRCLE_BUILD_NUM"}case "$CIRCLE_BRANCH" in master|channel/*) push_build_num;;esacBRANCH_TAG="${CIRCLE_BRANCH//\//-}"docker tag "$IMAGE_NAME" "$IMAGE_NAME:$BRANCH_TAG"docker push "$IMAGE_NAME:$BRANCH_TAG"
filipesperandioSep 11, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
@wfleming Thanks for the feedback, I am working on the adjustments. In the meantime, I was looking intocommunity submission scripts and have a couple questions:
- It is pushing images to gcr.io. Should we do it too? Does gcr.io and docker hub sync somehow? (forgive my ignorance)
- Haven't found where we tag channels there, but from what I see in the registry, we have something like
engine:beta
forchannel/beta
branch, notengine:channel-beta
. Could you confirm?
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.
It is pushing images to gcr.io.
We use GCR as a separate image repository, and run production service images off of it, but we no longer use it for engines at all, and we're deprecating usage of it overall. So, no, you don't need to push to it.
Shipbot is actually responsible for listening to webhooks and moving some of those images up to dockerhub right now. Which is probably more convoluted than it needs to be!
Haven't found where we tag channels there, but from what I see in the registry, we have something like engine:beta for channel/beta
That's a great point, and it made me realize my previous advice was bad & more complicated than we need.
Shipbot is responsible (similar to what I said above for community) for pushing up taggedbNNN
builds and properly-renamedchannel/
builds.
And because of how Shipbot handles that right now, I think you actually do want to use Patrick within this repo, same as it is in, say RuboCop. Shipbot would handle the rest when things are merged. (A small change is needed in Shipbot to whitelist this repo as a releasable engine.)
Sorry for my going down the wrong path on this! It's been so long since we released a new engine that I'd quite forgotten where in the stack we did some of those tasks, and when we moved away from Patrick on some repos likeapp
, I thought we'd made more progress on not needing it on engines as well. I wasted your time, sorry about that.
filipesperandioSep 11, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
No worries. Was an opportunity for me to better understand everything!
No description provided.