Exit-AppVeyorBuild command doesn't work in if-statement

TAMAGAWA Hiroko's Avatar

TAMAGAWA Hiroko

22 Sep, 2020 01:30 AM

It did work before, but now it doesn't stop the build nor throw an error, just proceed to the next step.
Please refer to this repository & build result showing a minimum example.

  1. Support Staff 1 Posted by Feodor Fitsner on 22 Sep, 2020 02:05 AM

    Feodor Fitsner's Avatar

    What was the last build it worked - could you drop a link to that build please?

  2. 2 Posted by TAMAGAWA Hiroko on 22 Sep, 2020 03:04 AM

    TAMAGAWA Hiroko's Avatar

    Sorry, I have only private repository's build of our company account. Can you look at it?
    https://ci.appveyor.com/project/NozomiIto/magic-pod/builds/34305129...

  3. 3 Posted by TAMAGAWA Hiroko on 22 Sep, 2020 03:12 AM

    TAMAGAWA Hiroko's Avatar

    I've attached the screenshot of the log.
    It looks complicated, in this case the build is stopped by this branch condition

    if (($env:TEST_SUITE_NO -ne 1) -And (($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "macos") -Or ($env:SKIP_TEST -eq $True))) {
      Exit-AppVeyorBuild
    }
    

    We have a build matrix consisting of 4 jobs (2 test suites x 2 images) to execute our tests on various browsers. Some jobs are skipped according to environment variables (ex. We sometimes skip some browsers' test).

  4. 4 Posted by TAMAGAWA Hiroko on 22 Sep, 2020 04:14 AM

    TAMAGAWA Hiroko's Avatar

    Oh sorry, you want the "last" one. It seems the behavior has changed around a month ago.

  5. Support Staff 5 Posted by Feodor Fitsner on 22 Sep, 2020 04:39 PM

    Feodor Fitsner's Avatar

    Hi Hiroko,

    Exit-AppVeyorBuild must be the last command in the script to make it worked. Changing init section in your example to the following works:

    init:
    - ps: >-
        if ($True) {
          echo "Exit"
          Exit-AppVeyorBuild
        } else {
          git config --global core.autocrlf input
        }
    
  6. 6 Posted by TAMAGAWA Hiroko on 22 Sep, 2020 11:50 PM

    TAMAGAWA Hiroko's Avatar

    Now I have confirmed the behavior, thank you!

  7. TAMAGAWA Hiroko closed this discussion on 22 Sep, 2020 11:50 PM.

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