Create artifact conditionally

Chris's Avatar

Chris

10 Jun, 2016 04:40 PM

Is there a way to create an artifact only when a certain condition is met, such as the value of an environment variable? I'm aware that I can have different configuration per branch but I would like to be able to do it based on how the build is started. When I start a build from a Jira release I would like to produce and publish an artifact. All other times, I do not want to save an artifact. Thanks

  1. Support Staff 1 Posted by Feodor Fitsner on 10 Jun, 2016 04:46 PM

    Feodor Fitsner's Avatar

    You can use script to push artifact: http://www.appveyor.com/docs/packaging-artifacts#pushing-artifacts-...

    For example:

    IF "%some_var%"=="value" appveyor PushArtifact ...
    
  2. 2 Posted by Christopher J C... on 10 Jun, 2016 04:48 PM

    Christopher J Cannell's Avatar

    Excellent. Thank you

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