tag:help.appveyor.com,2012-11-13:/discussions/questions/19858-accessing-build-artifacts-from-one-project-in-anotherAppVeyor: Discussion 2018-08-25T02:28:38Ztag:help.appveyor.com,2012-11-13:Comment/451580372018-04-24T02:04:35Z2018-04-24T02:04:52ZAccessing build artifacts from one project in another<div><p>You need to wrap URL in double quotes.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/451580372018-04-25T08:21:42Z2018-04-25T08:21:44ZAccessing build artifacts from one project in another<div><p>Thank you Ilya,</p>
<p>that fixed the first part, but I am still unable to download the artifacts using the command <code>appveyor DownloadFile <link></code> or <code>curl -L -o<name> <link></code> in the appveyor.yml. It always gives a 404 Error.</p>
<p>Cheers Volker</p></div>Volker Enderleintag:help.appveyor.com,2012-11-13:Comment/451580372018-04-25T08:38:43Z2018-04-25T08:38:44ZAccessing build artifacts from one project in another<div><p>Forgot to mention:</p>
<p>if I copy the link to the browser the download immediately starts. So it is still mysterious to me.</p>
<p>Cheers Volker</p></div>Volker Enderleintag:help.appveyor.com,2012-11-13:Comment/451580372018-04-25T15:46:46Z2018-04-25T15:46:46ZAccessing build artifacts from one project in another<div><p>Try to run the same command in PowerShell (<code>- ps:</code> prefix), or even use <a href="https://www.appveyor.com/docs/how-to/download-file/#start-filedownload-cmdlet">Start-FileDownload</a> cmdlet. It is simpler to run command containing all those special symbols in PowerShell.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/451580372018-04-26T22:30:46Z2018-04-26T22:30:47ZAccessing build artifacts from one project in another<div><p>As the job name can be arbitrarily complex for build matrices I came up with the following solution:</p>
<pre>
<code> - sh: DOWNLOAD_FILE=<project>-1.3.0-$COMPILER_ID-$CMAKE_PLATFORM-$CMAKE_CONFIGURATION.tar.gz
- sh: DOWNLOAD_ADDRESS=https://ci.appveyor.com/api/projects/<account>/<project>/artifacts/$DOWNLOAD_FILE
- sh: 'curl -fsSL -G -v -o "$DOWNLOAD_FILE" "$DOWNLOAD_ADDRESS" --data-urlencode "branch=AppVeyorCI" --data-urlencode "job=Environment: APPVEYOR_BUILD_WORKER_IMAGE=$APPVEYOR_BUILD_WORKER_IMAGE, CMAKE_GENERATOR=$CMAKE_GENERATOR, configuration=$CMAKE_CONFIGURATION, platform=$CMAKE_PLATFORM, CMAKE_CONFIGURATION=$CMAKE_CONFIGURATION, CMAKE_PLATFORM=$CMAKE_PLATFORM, CMAKE_ARCH_FLAGS=$CMAKE_ARCH_FLAGS, COMPILER_ID=$COMPILER_ID"'</code>
</pre>
<p>You might feel free to add this note as example to the download file section of the documentation.</p>
<p>Thank you again Ilya for your support.</p></div>Volker Enderleintag:help.appveyor.com,2012-11-13:Comment/451580372018-05-04T17:33:35Z2018-05-04T17:33:35ZAccessing build artifacts from one project in another<div><p><strong>@Volker</strong> thanks a lot for sharing!</p></div>Ilya Finkelshteyn