Badge tracks whatever that last branch built

Jay Tuley's Avatar

Jay Tuley

25 Feb, 2014 04:06 AM

This is an issue if I update that gh-pages branch that is not build-able, it puts an erroneous failed badge on my github page.

  1. Support Staff 1 Posted by Feodor Fitsner on 25 Feb, 2014 04:18 AM

    Feodor Fitsner's Avatar

    Hi Jay,

    You can use [skip ci] when committing changes to that branch (http://www.appveyor.com/docs2/how-to/skip-build).

    Also, I think we should ignore "gh-pages" branch by default and also add branches filter to project settings.

    Thanks for the catch! I'm going to add working item.

  2. Support Staff 2 Posted by Feodor Fitsner on 25 Feb, 2014 04:26 AM

    Feodor Fitsner's Avatar

    Wait, another idea. What if AppVeyor should display badge for master (default branch) only?

  3. 3 Posted by Jay Tuley on 25 Feb, 2014 02:58 PM

    Jay Tuley's Avatar

    Travis-ci actually makes a different badge url for each branch.

  4. 4 Posted by jay on 25 Feb, 2014 03:06 PM

    jay's Avatar

    Oh I do also think you should exclude gh-pages or just have a mechansim to exclude or explicitly specify branches. I don't want to do ci skip everytime on gh-pages.

  5. Support Staff 5 Posted by Feodor Fitsner on 25 Feb, 2014 03:08 PM

    Feodor Fitsner's Avatar

    Sure, we'll fix that shortly.

    Thanks!

    - Feodor

  6. Support Staff 6 Posted by Feodor Fitsner on 26 Feb, 2014 05:27 AM

    Feodor Fitsner's Avatar

    Hi Jay,

    AppVeyor update has been deployed with improved badges logic.

    To specify branch in badge URL append /branch/<branch-name> to the URL you see on Badges tab of project settings, for example:

    https://ci-beta.appveyor.com/api/projects/status/5y6ic907jh8u27j5/branch/master
    

    If branch IS specified badge shows the status of latest build of this branch; if branch IS NOT specified then badge shows the status of the last build of any branch.

  7. Support Staff 7 Posted by Feodor Fitsner on 26 Feb, 2014 05:32 AM

    Feodor Fitsner's Avatar

    Also, branches white-/blacklisting was added. You can specify included/excluded branches on General tab of project settings.

    To specify the list of branches in appveyor.yml:

    branches:
      only:
        - master
        - production
    

    To specify the list of branches that must be ignored:

    branches:
      except:
        - /dev.*/
        - playground
    

    gh-pages branch is always excluded unless explicitly added in "only" list.

  8. 8 Posted by jay on 27 Feb, 2014 02:19 PM

    jay's Avatar

    Cool, yay!

  9. 9 Posted by Sebastien on 15 May, 2014 04:49 AM

    Sebastien's Avatar

    You should add a reference to this topic on the Badges page. This is very useful.

  10. 10 Posted by James Foster on 17 Jun, 2014 04:22 PM

    James Foster's Avatar

    Being able to specify a branch name for a status badge is great. However, I'm having some trouble with branches with a / in the name. for example feature/my-feature

    Also, if I specify a branch that doesn't exist, instead of getting a 404 {message doesn't exist"} I get the status badge for the latest build.

    Thanks

  11. Support Staff 11 Posted by Feodor Fitsner on 17 Jun, 2014 04:34 PM

    Feodor Fitsner's Avatar

    Have you tried encoding slash with %2F?

  12. 12 Posted by James Foster on 17 Jun, 2014 07:14 PM

    James Foster's Avatar

    Yes

    Sent from my iPhone

  13. Support Staff 13 Posted by Feodor Fitsner on 17 Jun, 2014 07:15 PM

    Feodor Fitsner's Avatar

    OK, will take a look what's wrong.

  14. Support Staff 14 Posted by Feodor Fitsner on 17 Jun, 2014 07:26 PM

    Feodor Fitsner's Avatar

    It's been fixed and will be go with the next update.

  15. 15 Posted by James Foster on 18 Jun, 2014 12:57 AM

    James Foster's Avatar

    That's great. Thanks

  16. Support Staff 16 Posted by Feodor Fitsner on 18 Jun, 2014 04:01 AM

    Feodor Fitsner's Avatar

    Update has been deployed. Should be OK now.

  17. 17 Posted by James Foster on 19 Jun, 2014 10:44 AM

    James Foster's Avatar

    Thanks Feodor

    It's now picking up our feature branches correctly. However, if the branch name doesn't exist or isn't found it's still returning the default badge.

    This really should return a 404 with some error status because going to feature/i-think-it-exists and seeing a shiny green success icon could be very confusing.

    Thanks

    James

  18. Support Staff 18 Posted by Feodor Fitsner on 19 Jun, 2014 02:27 PM

    Feodor Fitsner's Avatar

    Will take a look.

    - Feodor

  19. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:45 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

01 Oct, 2024 04:27 PM
26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM