Skip to content

Support CircleCI badges - #807

Merged
carols10cents merged 2 commits into
rust-lang:masterfrom
sfackler:circle-badge
Jul 11, 2017
Merged

Support CircleCI badges#807
carols10cents merged 2 commits into
rust-lang:masterfrom
sfackler:circle-badge

Conversation

@sfackler

Copy link
Copy Markdown
Member

Closes #800

ember-cli seems unhappy with Node 8 that Arch Linux has, so I haven't run frontend tests unfortunately :(

Badge docs: https://circleci.com/docs/1.0/status-badges/

@sfackler
sfackler force-pushed the circle-badge branch 4 times, most recently from 46bb0d0 to b8e95e3 Compare June 26, 2017 02:04
@sfackler

sfackler commented Jul 4, 2017

Copy link
Copy Markdown
Member Author

Ping @carols10cents

@locks

locks commented Jul 4, 2017

Copy link
Copy Markdown
Contributor

cc @Turbo87 on node 8 + CLI

@Turbo87

Turbo87 commented Jul 4, 2017

Copy link
Copy Markdown
Member

@sfackler

sfackler commented Jul 4, 2017

Copy link
Copy Markdown
Member Author

Rebased

@sfackler

sfackler commented Jul 5, 2017

Copy link
Copy Markdown
Member Author

The test failure looks unrelated to this PR.

@carols10cents

Copy link
Copy Markdown
Member

Thank you for your patience on this! Rebased and force pushed to resolve a merge conflict and get tests to run again.

The code looks good, but I noticed that the CircleCi docs say this:

(You can also link to the image without providing a circle-token, in which case the image will only appear for people who are currently logged-in to circleci.com!)

That seems unfortunate. Do you think we should optionally accept a circle-token, so at least crate authors have the ability to make their image show up for everyone?

@carols10cents

Copy link
Copy Markdown
Member

Oooooh, one other thing:

One small wrinkle: if your branch name includes characters that are “special” in URLs (most commonly ‘/’) they’ll need to be URL encoded when constructing status badge URLs. For example, the badge for a branch called ‘feature/nonexistent’ would be at ‘…/tree/feature%2Fnonexistent.png’.

I just tested this out by making a branch named "cratesio/test" and specifying that:

[badges]
circle-ci = { repository = "carols10cents/sassers", branch = "cratesio/test" }

and indeed, we're not URL encoding the slash; the HTML getting generated for the image is:

<img src="https://circleci.com/gh/carols10cents/sassers/tree/cratesio/test.svg?style=shield" alt="Circle CI build status for the cratesio/test branch" title="Circle CI build status for the cratesio/test branch">

and indeed the image doesn't load :-/

@sfackler

sfackler commented Jul 9, 2017

Copy link
Copy Markdown
Member Author

I think the circle token comment only applies to private repos - I was worried about this as well initially. For example, this badge page is visible to me when logged out from circle - is it visible for you as well?

Fixed up the URL encoding!

@Turbo87

Turbo87 commented Jul 9, 2017

Copy link
Copy Markdown
Member

@carols10cents I'm wondering why we don't just use http://shields.io/ instead for all the badges?

@carols10cents

Copy link
Copy Markdown
Member

@carols10cents I'm wondering why we don't just use http://shields.io instead for all the badges?

@Turbo87 does it support everything we want? i don't see gitlab CI on there, for example

@Turbo87

Turbo87 commented Jul 9, 2017

Copy link
Copy Markdown
Member

yeah, seems like GitLab is missing 😞

@sfackler

sfackler commented Jul 9, 2017

Copy link
Copy Markdown
Member Author

I've also noticed shields's Cargo version badge being really slow to load.

@carols10cents

Copy link
Copy Markdown
Member

Thanks! Sorry for taking so long on this, but I'll be deploying it once travis passes! 🍏

@sfackler
sfackler deleted the circle-badge branch July 11, 2017 22:11
@sfackler

Copy link
Copy Markdown
Member Author

Sweet, thanks! There's no list of badges in Cargo I need to update as well, is there?

@carols10cents

Copy link
Copy Markdown
Member

Yeah there is: https://github.com/rust-lang/cargo/blame/1ee4edba1fa1a1d323be97bfec280764407d89e5/src/doc/manifest.md#L157

I got distracted yesterday and didn't finish deploying, but the deploy is going now!

sfackler added a commit to sfackler/cargo that referenced this pull request Jul 12, 2017
bors added a commit to rust-lang/cargo that referenced this pull request Jul 12, 2017
@jonhoo jonhoo mentioned this pull request Jul 11, 2019
bors added a commit that referenced this pull request Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants