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

Docker Hub Automated Build Status #241

Closed
bsdlp opened this issue Aug 19, 2014 · 25 comments
Closed

Docker Hub Automated Build Status #241

bsdlp opened this issue Aug 19, 2014 · 25 comments
Labels
service-badge New or updated service badge

Comments

@bsdlp
Copy link

bsdlp commented Aug 19, 2014

There's already an implementation made by @cpuguy83, but it would be great if shields added support.

@espadrine
Copy link
Member

I didn't notice at first, but this is an HTML scraper: https://github.com/cpuguy83/docker-hub-buildtag/blob/master/fetcher.go#L89.

I could give in to that, but only if there is absolutely no way around it. There is no promise made from hub.docker.com that the DOM structure won't change. I would feel much happier with an API whose structure I can rely on.

@espadrine
Copy link
Member

This seems to hold some information at first glance: https://docs.docker.com/reference/api/docker-io_api/.

@cpuguy83
Copy link

There isn't currently a public api to grab this, but it is planned.

@espadrine
Copy link
Member

@cpuguy83 Good to know. Thanks! I'll wait for it to implement this.

@hairyhenderson
Copy link

Just wanted to mention that there's a similar thing at @wblankenship's dockeri.co... Though it appears that just HTML-scrapes as well.

@retrohacker
Copy link

Thanks for the mention @hairyhenderson. Yeah, there isn't any other way to get to the data so I'm using screen scraping. The docker website is fairly stable though, hasn't broken yet.

That being said, looking forward to when there is a nice endpoint for metadata though 😄 🐋

@noonien
Copy link

noonien commented Feb 4, 2015

Any updates on this issue?

@cpuguy83
Copy link

cpuguy83 commented Feb 4, 2015

No new api's on the hub yet.

@cybertk
Copy link

cybertk commented May 16, 2015

+1

@espadrine
Copy link
Member

Do we have an example user/repo which is automated?

This kind of endpoint seems promising, but ubuntu isn't automated, I think: https://registry.hub.docker.com/v2/repositories/library/ubuntu/

@retrohacker
Copy link

They have been silently rolling out some metadata endpoints.

Example: https://registry.hub.docker.com/v2/repositories/wblankenship/dockeri.co/stars/count/

You can actually do a lot with it. https://registry.hub.docker.com/v2/repositories/wblankenship/dockeri.co/stars/

@hairyhenderson
Copy link

The docs are partially here: http://docs.docker.com/reference/api/docker-io_api/, but they don't fully cover the /v2/repositories/(repo)/ endpoint (mention of GET is missing...). I don't know if this means the API isn't public, or what... @cpuguy83?

Some other interesting endpoints:

{
  "count": 1,
  "tags": [
    "latest"
  ]
}

@retrohacker
Copy link

Just emailed support for documentation, will post back here with reply.

@korjavin
Copy link

Still nothing?

@cpuguy83
Copy link

It's not really documented yet, however some data is there now.
Hub 2.0 uses a pure client-side frontend, so all the api's the frontend needs to construct the page should be there.
Was able to find build history here:

curl -sSL -H 'Content-Type: application/json' https://hub.docker.com/v2/repositories/cpuguy83/ubuntu/buildhistory/

Looks like a build status of 10 is OK, -1 is some failure, I don't know the in-betweens yet.
This should be better documented soon.
I wouldn't rely on this information for shields yet as it is undocumented, and now that Hub 2.0 is finally out, we'll start to see these API's exposed more.

@cpuguy83
Copy link

Also

curl -sSL -H 'Content-Type: application/json' https://hub.docker.com/v2/repositories/cpuguy83/ubuntu/autobuild/

@espadrine
Copy link
Member

Thanks for this update!

@h0tbird
Copy link

h0tbird commented Sep 21, 2015

+1

@pl31
Copy link

pl31 commented Nov 8, 2015

I found (using browser debug mode):

  • tags and then tags/<name>
  • build or autobuild
  • dockerfile
  • comments
  • buildhistory and then buildhistory/<build_code> <-- (includes logs and dockerfile)
  • links
  • collaborators
  • groups
  • stars
  • buildtrigger (401) and buildtrigger/history (401)
  • webhooks (401)

And extracted the status from the client.js:
S={"-2":"exception","-1":"error",0:"pending",1:"claimed",2:"started",3:"cloned",4:"readme",5:"dockerfile",6:"built",7:"bundled",8:"uploaded",9:"pushed",10:"done"}

@hairyhenderson
Copy link

@pl31 - nice!

Has anyone started on a PR for this?

@schmunk42
Copy link

👍

@espadrine espadrine added the needs-upstream-help Not actionable without help from a service provider label Feb 14, 2016
@espadrine
Copy link
Member

Good work!

Unless someone makes a PR before then, I'll do this when I've processed the 60 remaining issues & PRs I haven't responded to yet.

jrottenberg pushed a commit to jrottenberg/ffmpeg that referenced this issue Feb 23, 2016
jrottenberg pushed a commit to jrottenberg/shields that referenced this issue Feb 28, 2016
@michaelmior
Copy link

@cpuguy83 I'm seeing status values of 3 for a build in progress and 0 for a build which is queued.

eddiewebb added a commit to eddiewebb/shields that referenced this issue Jan 14, 2017
@eddiewebb
Copy link
Contributor

eddiewebb commented Jan 14, 2017

Pretty small contribution, but I added the ability to report current status of last build. Thanks @pl31 for the statuses!

10 = passing
< 0 = Failing
0-9 = Pending

screen shot 2017-01-14 at 8 56 55 am

@paulmelnikow
Copy link
Member

Resolved via #856.

@paulmelnikow paulmelnikow added service-badge New or updated service badge and removed needs-upstream-help Not actionable without help from a service provider labels Oct 12, 2017
eddiewebb added a commit to eddiewebb/shields that referenced this issue Nov 14, 2018
eddiewebb added a commit to eddiewebb/shields that referenced this issue Nov 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

No branches or pull requests