Can I programatically iterate over the artifacts in an after_build step?

doug.schmidt's Avatar

doug.schmidt

22 Jan, 2021 07:48 PM

I'd like to add a code signing step to my builds, to sign any EXEs in the artifacts: collection of the appveyor.yml file.

I have a project that builds quite a few EXEs, but I only really care about signing the binaries that are exported as artifacts.

Can I programatically access all the artifacts listed in that collection, in a after_build: or before_package: section?

I guess I would need to access the path, name, and type properties of each artifact to sign it properly.

I'd rather not duplicate the list of artifacts elsewhere in the script, but that is the obvious workaround if I can't access the list programatically.

  1. 1 Posted by doug.schmidt on 22 Jan, 2021 07:56 PM

    doug.schmidt's Avatar

    https://www.appveyor.com/docs/packaging-artifacts/#getting-informat...

    That link says that a Powershell $artifacts hash table is added after the artifacts are uploaded, but I think need to access that before that step occurs.

  2. Support Staff 2 Posted by Feodor Fitsner on 22 Jan, 2021 11:56 PM

    Feodor Fitsner's Avatar

    Hi Doug,

    The easiest way to solve that would be manual packaging and signing artifacts and pushing them with a script or via artifacts section.

  3. 3 Posted by doug.schmidt on 23 Jan, 2021 12:48 AM

    doug.schmidt's Avatar

    OK, thanks for the info. I'll add a custom step that does the manual signing

  4. doug.schmidt closed this discussion on 03 Sep, 2021 06:33 PM.

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

Recent Discussions

18 Oct, 2021 12:38 PM
16 Oct, 2021 04:34 PM
15 Oct, 2021 08:29 PM
15 Oct, 2021 06:34 PM
13 Oct, 2021 03:47 PM

 

13 Oct, 2021 06:27 AM
13 Oct, 2021 05:54 AM
12 Oct, 2021 06:48 PM
12 Oct, 2021 06:47 PM
12 Oct, 2021 12:36 PM
11 Oct, 2021 10:05 AM