tag:help.appveyor.com,2012-11-13:/discussions/questions/27811-how-to-restrict-artifacts-to-be-uploaded-only-from-one-imageAppVeyor: Discussion 2018-12-12T21:00:36Ztag:help.appveyor.com,2012-11-13:Comment/462422882018-10-11T12:34:44Z2018-10-11T12:34:46ZHow to restrict artifacts to be uploaded only from one image<div><p>I have a build which should run on two images. However, in the end I want to collect artifacts only from one of them. How can I achieve that? I have seen that for deployment, there is the "on" condition where it is possible to specify it. Is there anything similar for artifacts?</p>
<p>My yaml file:<br></p>
<pre>
<code>image:
- Visual Studio 2017
- Ubuntu1804
build_script:
- cmd: build.bat
- sh: chmod u+x ./build.sh
- sh: ./build.sh All
test: off
version: 1.1.0.{build}
artifacts:
- path: TickSpec\bin\Release
name: release
- path: 'packed_nugets*.nupkg'
type: NuGetPackage
nuget:
account_feed: false
project_feed: false</code>
</pre></div>Milos Chaloupkatag:help.appveyor.com,2012-11-13:Comment/462422882018-10-11T21:47:09Z2018-10-11T21:47:09ZHow to restrict artifacts to be uploaded only from one image<div><p>You can make use of the <code>for:</code> construct like this,</p>
<pre>
<code>for:
-
matrix:
only:
- image: Visual Studio 2017
artifacts:
- path: 'packed_nugets*.nupkg'
type: NuGetPackage
-
matrix:
only:
- image: Ubuntu
artifacts:
- path: TickSpec\bin\Release
name: release</code>
</pre></div>Owen McDonnell