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

Bitrise.io #574

Closed
larsbrinkhoff opened this issue Nov 27, 2015 · 11 comments · Fixed by andruszd/shields#9
Closed

Bitrise.io #574

larsbrinkhoff opened this issue Nov 27, 2015 · 11 comments · Fixed by andruszd/shields#9
Labels
good first issue New contributors, join in! service-badge New or updated service badge

Comments

@larsbrinkhoff
Copy link
Contributor

Bitrise is a hosted CI service for MacOS X.

I'm not sure there's a way to get at the build status, but here are the docs:
http://devcenter.bitrise.io/

@larsbrinkhoff
Copy link
Contributor Author

Sample:
Bitrise

@larsbrinkhoff
Copy link
Contributor Author

I don't see anything about an API to get at the build status. And the build badge HTTP headers doesn't seem to leak any useful info.

Maybe detect green/red in the PNG?

@Zhukn1
Copy link

Zhukn1 commented Dec 13, 2015

If you click on the badge inside Bitrise's dashboard you will be presented with a popup.

Inside the popup you have the option to choose a branch and the link format: ImageURL or Markdown.

This is an example of the Markdown one from one of my repositories:
[![Build Status](https://www.bitrise.io/app/865b8202a70ccb07.svg?token=pSNcntf_xtpD1glCA31v1g&branch=master)](https://www.bitrise.io/app/865b8202a70ccb07)

which turns into:

Build Status

There is a feature request for build checking via API, so if you really need it don't hesitate to upvote. The team takes this serious and integrates the most upvoted features rather fast.

@paulmelnikow
Copy link
Member

Are we still waiting for an API?

@paulmelnikow paulmelnikow added the needs-upstream-help Not actionable without help from a service provider label Apr 18, 2017
@larsbrinkhoff
Copy link
Contributor Author

Supposedly, an API is being implemented:
https://discuss.bitrise.io/t/bitrise-public-api/37/39

@larsbrinkhoff
Copy link
Contributor Author

Ping @viktorbenei.

@viktorbenei
Copy link

Thanks for the ping @larsbrinkhoff !

API docs and Token gen coming soon ( https://discuss.bitrise.io/t/bitrise-public-api/37/39?u=viktorbenei ), feel free to comment there, or point me to the docs what you'd need the API to return (and how).

@paulmelnikow
Copy link
Member

@viktorbenei Most of the services provide an HTTPS GET endpoint to obtain the project status, using the default branch. The endpoint should also allow obtaining the build status of a specific branch. Since the token becomes public, it should be read-only, and ideally be limited to build status.

Cool company! It's good to have more CI options for OS X. 👍

@viktorbenei
Copy link

Thanks @paulmelnikow ;)

HTTPS GET endpoint to obtain the project status, using the default branch. The endpoint should also allow obtaining the build status of a specific branch. Since the token becomes public, it should be read-only, and ideally be limited to build status.

That's exactly what we have, but right now only for the badge image (SVG endpoint), it doesn't have a JSON response.

I can schedule a JSON response for the endpoint too - do you have a preferred JSON response/example?

@paulmelnikow
Copy link
Member

Here's an example I pulled from a link in the source code. We don't need so much, though.

A JSON response with a status string is sufficient, e.g. success, failure, error, no tests, never built. You could throw in the timestamp if you want. The status code should be 200.

When the auth token is bad or the repo is not found, the response should be clearly distinguishable so we can provide a helpful error, like "invalid token or repo not found". To avoid leaking information you may not want to distinguish between these, which is fine. These could be 403.

@viktorbenei
Copy link

We finally had the time to implement the required changes to the endpoint, and it's now in production. We actually decided to change the URL a little bit. The previous endpoint still exists, but that only supports the SVG badge response, as it did previously.

You can find the API docs here: http://devcenter.bitrise.io/api/app-status-badge/

I think it should cover everything you mentioned @paulmelnikow , if not, just let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue New contributors, join in! service-badge New or updated service badge
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants