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

 

01 Oct, 2024 04:27 PM
26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM