Powershell 'Run Script Block' action timing out while trying to retrieve a large artifact from jFrog Artifactory Server.
The script being used in the action is:
Invoke-WebRequest -Uri "https://artifactory.srv.com/artifactory/CRS_Install/rsitservwin-188.8.131.520-wx64.exe" -OutFile "rsitservwin-184.108.40.2060-wx64.exe"
The nolio_action_exe log on the agent running the action shows the following:
2018-03-27 10:41:49,758 [job-754427-jobServer-888443-7:Powershell - Retrieve Reflections Application(P83680.F650555.E650556):PowerShell - Run Script Block] INFO (com.nolio.platform.shared.datamodel.Action:334) - ------------------------Finished action [Powershell - Retrieve Reflections Application(P83680.F650555.E650556):PowerShell - Run Script Block] result [false, Error: Exception occurred: ERROR: Execution timed out. Check output for details.]------------------------
The powershell command works outside Release Automation without issues. Total time for execution is around 2 minutes.
Even if we increase the 'Execution timeout' in the Inputs section of the action, it does not work.
All versions of CA Release Automation
The Powershell action works with small artifacts but doesn't seem to work with large artifacts.
The Powershell action was not designed to fetch large artifacts within in script block from Jfrog Artifactory. There are separate Jfrog Artifactory actions which can be used to fetch artifacts 'JFrog - Retrieve Artifacts'.
The workaround here is to using the command prompt using the -command switch in the script block as below:
powershell.exe -noprofile -command "Invoke-WebRequest -Uri https://artifactory.srv.com/artifactory/CRS_Install/rsitservwin-220.127.116.110-wx64.exe -outfile rsitservwin-18.104.22.1680-wx64.exe"