How do I run a script after all matrix possibilities succeed

justin's Avatar

justin

03 Apr, 2015 03:32 PM

on_success seems to run after each platform/configuration combination in the matrix. I need to run something only if they all succeed. Is that possible?

  1. Support Staff 1 Posted by Feodor Fitsner on 03 Apr, 2015 03:46 PM

    Feodor Fitsner's Avatar

    All jobs run independently and on_success is part of the job, not a build - unless you use some external storage to coordinate state between build jobs. There is an item that might be related to your scenario: https://github.com/appveyor/ci/issues/132

  2. 2 Posted by justin on 03 Apr, 2015 05:55 PM

    justin's Avatar

    Suppose I want to build with the following matrix:

    platform:
      - x86
      - x64
    configuration:
      - debug
      - release
    

    I am working on a node module that has a native addon. I want to upload the binaries to s3 but after they all succeed I want to upload the package to npm and tag the release, something like:

    on_success_all:
      - ...
      - npm version example@%APPVEYOR_BUILD_VERSION%
      - npm pack
      - npm publish
      - npm tag example@%APPVEYOR_BUILD_VERSION% %APPVEYOR_REPO_BRANCH%
    

    The above works, but I want to do only once at the end. Is there a way to do that?

  3. Support Staff 3 Posted by Feodor Fitsner on 07 Apr, 2015 01:56 AM

    Feodor Fitsner's Avatar

    It's currently not possible to run something per-build. However, you can use webhook notification to trigger external service and then using AppVeyor REST API starting either deployment to the environment or running a new build doing publishing.

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:55 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