Windows images hang at artifact processing
I have a build using the Visual Studio 2022
image where I create a NuGet package and set that as the artifact for later pushing to MyGet.
This build finishes running my build script and hangs at the point where it should be locating the artifacts. Here is one of the affected build logs. The relevant parts of the build:
image: Visual Studio 2022
build_script:
- pwsh: .\build.ps1
artifacts:
- path: artifacts\packages\**\*.*nupkg
name: MyGet
type: NuGetPackage
I have tried:
- Switching to the
Visual Studio 2019
image. - Removing the
type
on the artifact. - Switching to Windows style path delimiters
/
Unfortunately, the net result is the same: I see my build script echo "build completed" to the console (indicating the script has completed entirely), then... nothing. An hour goes by, the build times out.
I have very similar builds running on the Linux agents and they all work great. If this wasn't using full .NET 4.7.2, I'd just switch the agent and call it good, but I can't.
Is there something up with artifacts on Windows right now?
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
1 Posted by tillig on 02 Mar, 2022 04:34 PM
I've discovered that this has to do with the use of Gpg4Win - if I run any
gpg.exe
command, it appears the command exits but the build script isn't allowed to complete/exit.Adding
gpg-connect-agent.exe killagent /bye
at the end of the script allows the script to complete. This kills the background agent process that was keeping the script open. This doesn't seem to be required on a Linux build, where the same GPG commands are used and the agent is launched, but the agent doesn't keep the build script alive.Support Staff 2 Posted by Feodor Fitsner on 02 Mar, 2022 04:43 PM
Thanks for the update - that will help others with similar issue! Yep, on Windows hanging child processes could prevent parent one from exiting.
Feodor Fitsner closed this discussion on 02 May, 2022 09:02 PM.