Artifacts were not pushed on failure

Weirong Zhu's Avatar

Weirong Zhu

14 Aug, 2015 06:45 AM

Here is my appveyor.xml: https://github.com/zhuweirong/Prajna/blob/dfd184cc6d92cfa297eabef6e663c0af296ecda7/appveyor.yml

It specifies that

# on build failure
on_failure:
  - ps: $root = Resolve-Path .\TestLog; [IO.Directory]::GetFiles($root.Path, '*.*', 'AllDirectories') | % { Push-AppveyorArtifact $_ -FileName $_.Substring($root.Path.Length + 1) -DeploymentName to-publish }

Basically, I want to get files under TestLog directory as artifacts upon build failure.

However, when the build failed: https://ci.appveyor.com/project/zhuweirong/prajna-ukxg6/build/0.0.1.2, I didn't get any artifacts. I know the build always fails due to tests timeout. I cannot repro locally, thus I need to get the logs under "TestLog" directory to investigate what happened.

I followed the instruction at http://www.appveyor.com/docs/packaging-artifacts, to write above "on_failure" command. But it does not seem work. From the console, I cannot tell whether the command was executed and (if so) why it failed.

Also, the whole build takes 40 minutes. However, the console did not have any outputs after 24:47 minutes (tests time out is 20 minutes), so I cannot tell what's going on after that.

Could you please help me figure out how to get the artifacts (files under TestLog) when the build fails?

  1. Support Staff 1 Posted by Feodor Fitsner on 14 Aug, 2015 03:48 PM

    Feodor Fitsner's Avatar

    That handler is not called on build timeout. I'd recommend either run tests in a separate process (PowerShell for example) and set timeout less than build timeout or try looking via RDP: http://www.appveyor.com/docs/how-to/rdp-to-build-worker

  2. 2 Posted by Weirong Zhu on 14 Aug, 2015 04:25 PM

    Weirong Zhu's Avatar

    From the console, it seems that the tests have timed out before the build time out. The test timed out at about 24 min. The build timed out at 40 min. There's no other messages in console after 24:47. Also, it seems everything in my build script has finished based on what were shown on console. So I'm not sure what caused the build to time out.

  3. 3 Posted by Weirong Zhu on 14 Aug, 2015 05:56 PM

    Weirong Zhu's Avatar

    Looked via RDP, it seems there's a nunit-agent.exe process hanging after the tests timed out. It causes the build time out. Will look into it ...

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:58 AM.

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

17 Jul, 2019 12:16 AM
17 Jul, 2019 12:15 AM
16 Jul, 2019 10:50 PM
16 Jul, 2019 07:47 PM
16 Jul, 2019 06:34 PM

 

16 Jul, 2019 05:17 PM
16 Jul, 2019 10:17 AM
16 Jul, 2019 07:46 AM
15 Jul, 2019 06:33 PM
15 Jul, 2019 06:09 PM
15 Jul, 2019 05:53 PM