How do I download artifacts built in one job to test in other jobs?

Aaron Jensen's Avatar

Aaron Jensen

12 Jan, 2023 06:29 PM

I have a build for a PowerShell module that produces two build outputs: a .zip file and a .nupkg file. I need to build these outputs in a job on the latest build image (Visual Studio 2022), but then download and test the build outputs on other jobs running tests on different combinations of PowerShell and OS combinations.

How do I get the build output from one job onto the servers running the tests against that build output?

My module needs to run on Windows PowerShell 5.1 and .NET 4.6.2, but it can't build on the Visual Studio 2015 image because it needs to target .NET standard, which isn't possible on that image.

My current appveyor.yml file is atttached.

  1. Support Staff 1 Posted by Feodor Fitsner on 12 Jan, 2023 06:44 PM

    Feodor Fitsner's Avatar

    Hi Aaron,

    You can download artifacts from any build job using AppVeyor REST API. Here's an example for PowerShell: https://www.appveyor.com/docs/api/samples/download-artifacts-ps/. I also have an example in Python if you need it.

    Any version of .NET Core can be installed with PowerShell during the build: https://github.com/appveyor/build-images/blob/master/scripts/Window...

    Let me know if you have any questions.

  2. 2 Posted by splatteredbits on 12 Jan, 2023 08:30 PM

    splatteredbits's Avatar

    I'd like to see this as a first-class part of the appveyor command-line tool. I see that's a feature requested here: https://github.com/appveyor/ci/issues/1857 . Please implement!

    Also, where is the appveyor command line tool documented? I can't find it.

  3. Support Staff 3 Posted by Feodor Fitsner on 12 Jan, 2023 08:31 PM

    Feodor Fitsner's Avatar

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • appveyor.yml 3.49 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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

Recent Discussions

27 Jan, 2023 08:06 PM
27 Jan, 2023 08:05 PM
25 Jan, 2023 03:23 PM
25 Jan, 2023 03:22 PM
23 Jan, 2023 03:29 PM