-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Adds actual build status from docker hub as discussed in issue #241 #856
Conversation
Oh ! Very nice |
@espadrine - anything I can do to help address the backlog of pull requests? |
Anything holding this? |
server.js
Outdated
badgeData.text[1] = 'failing'; | ||
badgeData.colorscheme = 'red'; | ||
} else { | ||
badgeData.text[1] = 'building..'; |
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.
Could you change this to 'building'
, for consistency with the appearance of other badges at https://shields.io/?
server.js
Outdated
try { | ||
var data = JSON.parse(buffer); | ||
var latest_status = data.results[0].status; | ||
if ( latest_status == 10 ) { |
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.
Can you remove the spacing in this if
? Most of the code looks that way today, though we don't have that linter rule turned on just yet.
server.js
Outdated
badgeData.colorscheme = 'red'; | ||
} else { | ||
badgeData.text[1] = 'building..'; | ||
badgeData.colorB = '#008bb8'; |
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 like that color!
server.js
Outdated
} | ||
var path = user + '/' + repo; | ||
var url = 'https://registry.hub.docker.com/v2/repositories/' + path + '/buildhistory'; | ||
var badgeData = getBadgeData('docker status', data); |
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.
'docker build'
seems like a clearer label, which would be more consistent with the other CI badges.
server.js
Outdated
@@ -4960,6 +4960,45 @@ cache(function(data, match, sendBadge, request) { | |||
}); | |||
})); | |||
|
|||
// Docker Hub automated integration, latest status (passed, pending, failed) | |||
camp.route(/^\/docker\/status\/([^\/]+)\/([^\/]+)\.(svg|png|gif|jpg|json)$/, |
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.
How about using docker/build
for this instead of docker/status
?
Hi, thanks for this contribution! Would love to get this merged. Left a handful of minor comments. If you could also merge master into the PR branch, you can check that the automated tests are passing. |
@eddiewebb I just saw your note above! Would be great to have some more help with the project. 😄 Would you be interested in working on some automated tests? |
I thought docker/build conflicts with the existing shield (which just indicates whether it exists, not health). But I can confirm and make the other changes. If it does conflict, would you rather replace or use a different path? |
The current badge is at |
Beauty. You'll see updates shortly |
Sorry, didn't get to it last night, but made the changes you suggested and merged in latest from the upstream's master branch. |
…ted url in try.html
Those error badges look a little busy, how about just This is looking great. I'll test on my machine and then should be good to go. |
Love it! All looks good. Last step is to test this myself, which might take a day or two. |
Cool, ran this and it looks good. This is a documentation nit. From looking at https://hub.docker.com/r/jrottenberg/ffmpeg/builds/, it seems like "latest" has a special meaning on Docker Hub. Is that correct? If so, would it be better to avoid the word "latest" in the code and documentation here, and instead say something like "most recent"? |
@paulmelnikow, it is a convention many use to Tag the most recent stable build as "LATEST". I'll update the code and comments to be most_recent to eliminate any ambiguity. |
Thanks! Appreciate your responsiveness. |
@paulmelnikow What do you think? |
index.html: I'd prefer we just update and commit it at deploy time. It makes PRs easier to read, avoids unnecessary merge conflicts, is fewer steps for contributors, and makes it less likely contributors will accidentally update I'd like to update the deploy script to do that, feel free to open an issue if you'd like to track it. The changes will go live when Thaddée next deploys the server. How's that for a tautology? |
@paulmelnikow I created two issues for discussion and checked all questions as answered. Thanks! |
@paulmelnikow @eddiewebb really been looking forward to this. thanks! even though it's been merged in is there a reason it's not showing up on the homepage? forgive me if i'm missing something obvious. |
@hobakill
It is not an automated deploy but you can create an issue for that. |
I'm glad everyone is so excited about it! I'll post a note here once it happens. |
🚀 Deployed. |
Could you open a new issue, please? |
Sure, will do. |
what is the markdown code to implement these docker badge? |
@liaogz82: ![Docker Stars](https://img.shields.io/docker/stars/jrottenberg/ffmpeg.svg)
![Docker Pulls](https://img.shields.io/docker/pulls/jrottenberg/ffmpeg.svg)
![Docker Automated](https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg)
![Docker Build](https://img.shields.io/docker/build/jrottenberg/ffmpeg.svg) |
Please open an issue. |
For me it shows |
Hi! This PR is two years old. Could you please open a new issue? |
Building on @jrottenberg 's contribution, but adding actual status for latest build to address discussion in issue #241
I debated just leaving the language to duplicate "Docker Automated Build" and let's folks choose. BUt ultimately decided to use "Docker Build Status" instead, I'd use it either way.