build any pull requests against any branches

Arian's Avatar

Arian

06 Jun, 2018 02:52 PM

Hi,
I had the following code in my .yml file to build only master and the pull requests against master. this was working as expected.
branches:
      only:
      - master

the new requirement is to build any pull requests against any branches, so I removed the code above. but after removing this no build was triggered. so I had to add a dummy rule like below:
branches:
    except:
    - "1234" #a dummy branch that does not exist
  skip_branch_with_pr: true

this dummy rule does work but I don't like it. is there a way to not use this hacky solution?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 06 Jun, 2018 03:57 PM

    Ilya Finkelshteyn's Avatar

    We need the following information:

    • GitHub commit ID for change which which did not trigger the build.

    • Find AppVeyor webhook on GitHub, then in recent deliveries find delivery connected to this commit and send us:

      • value of X-GitHub-Delivery header
      • exact time (with time zone) webhook was sent
    • Full .yml file.

  2. 2 Posted by Arian on 07 Jun, 2018 10:34 AM

    Arian's Avatar

    when doing a commit on my open pull request these two deliveries gets generated:
    1) 2018-06-07 12:15:43 +0200
    X-GitHub-Delivery: bc857e00-6a3b-11e8-9fa9-525684bd2ee8
    2) 2018-06-07 12:15:42 +0200
    X-GitHub-Delivery: bc4be03c-6a3b-11e8-9355-e74fe508bf2f

    since it is a public discussion, for security reasons I trimmed down the .yml file and removed the non-related codes:

    #Tag build
    
    
    skip_non_tags: true version: 0.0.0.{build} image: Visual Studio 2017 configuration: Release platform: Any CPU force_https_clone: true clone_depth: 1 clone_folder: c:\quote matrix: fast_finish: true


    nuget: account_feed: true


    environment: NuGetPassword: secure: <secure>


    init: - ps: >- <Some scripts>


    before_build: - ps: >- <Some scripts>


    build_script: - ps: | <Some scripts>


    after_build: - <Some scripts>


    test: off


    artifacts: - <Some Artifacts>


    #------------------------------------------------------------------------------

    Commit build

    
    
    
    - skip_branch_with_pr: true skip_tags: true version: 0.0.0.{build} image: Visual Studio 2017 configuration: Release platform: Any CPU force_https_clone: true clone_depth: 1 matrix: fast_finish: true
    environment: NuGetPassword: secure: <secure>
    init: - ps: >- <Some scripts>
    before_build: - ps: >- <Some scripts>
    build_script: - ps: | <Some scripts>
    after_build: - <Some scripts>
    test: off
    artifacts: - <Some Artifacts>
  3. 3 Posted by Arian on 07 Jun, 2018 12:12 PM

    Arian's Avatar

    I found a better solution which fixed my issue. I merged the two build configurations into one, and in each stage of the build I checked if its a tag do something otherwise do something else. this way the trigger worked without any hackish solutions.

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