Which build configuration does a tag triggered build choose?

Bobby's Avatar

Bobby

02 Nov, 2018 08:07 PM

My appveyor.yml file defines multiple build configurations. It looks something like this:

*****************
- #Build settings for Release
  branches:
    only:
      - Release

...

- #Build settings for Release Candidate branches
  branches:
    only:
    - /^.+_Release_Candidate$/

********************

When I add an annotated tag to my repo, it triggers an appveyor build, and it looks like it's choosing one of my non-release branches build configurations. The build log outputs the APPVEYOR_BUILD_VERSION environment variable, and the tag name is listed as the branch name. So it's not clear to me how appveyor chooses the branch configuration it uses when it performs a build triggered by a tag push. Could someone explain how this works?

  1. Support Staff 1 Posted by Owen McDonnell on 02 Nov, 2018 09:49 PM

    Owen McDonnell's Avatar

    You can find an explanation for this behaviour here in the docs.

    A quote from that section...

    However, please note that in case of annotated tag, branch and appveyor_repo_tag are mutually exclusive. This is because, for webhook created as a result of annotated tag, there is no practical reliable way to recognize what branch the tag was created from. Therefore with this setting deployment will happen only for master branch:

  2. 2 Posted by Bobby on 03 Nov, 2018 04:14 PM

    Bobby's Avatar

    Hi Owen,

    I had already read the docs, and I do not believe they answer my question, but please let me know if I'm mistaken. I don't have anything related to tags in my current appveyor.yml, so it's unclear to me how appveyor chooses which build configuration to use when performing a tag triggered build.

    Best,
    Bobby

  3. 3 Posted by Bobby on 03 Nov, 2018 04:16 PM

    Bobby's Avatar

    To be more specific,the docs say:

    "there is no practical reliable way to recognize what branch the tag was created from"

    so how does appveyor choose a build configuration to use?

  4. Support Staff 4 Posted by Owen McDonnell on 06 Nov, 2018 05:45 AM

    Owen McDonnell's Avatar

    I believe it will build the last commit of the branch from which the tag was pushed. Although there will not be a way to choose which configuration to choose so the default (fallback) will be chosen.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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