Hello,
We have an issue with our deploys failing with the subject error 'Unknown script-extension: ps1 '.
The process steps to deploy have remained unchanged, but since the past deploy and the one that fails we have updated to v2020.4.10, previous version installed was from 2018-2019.
The step that fails is supposed to run a powershell script included in a .nupkg that is obtained from a repo.
The script itself is very simple and contains two “.\filename.ps1” references before its own code. These files are also included in the nupkg.
I have verified that Octopus is able to obtain the nupkg file and extract it to the \work folder on the Octopus server.
I have obtained and verified the file contents of the nupkg that is used by octopus from the cache folder.
I could not see any indications that antivirus is blocking the file.
ProcessMonitor doesnt really show anything of interest.
-
octopus creates the bootstrap.ps1 file
-
powershell gets launched
|Command line:|“C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe” -NonInteractive -NoProfile -NoLogo -ExecutionPolicy Unrestricted -Command “$ErrorActionPreference = ‘Stop’; . {. ‘E:\Octopus\Work\20201202114032-73707-167\Bootstrap.ps1’ -variablePassword ffffffffffff==; if ((test-path variable:global:lastexitcode)) { exit $LastExitCode }}”
|Current directory:|E:\Octopus\Work\20201202114032-73707-167| -
powershell does not seem to have any issues using the bootstrap.ps1
-
powershell launches calamari which extracts the nupkg files contents
-
calamari finishes
-
powershell closes
-
octopus.server deletes the file in the work folder
Guided Failure mode does not help, as it seems that when this failure is triggered, Octopus has already deleted all the files in the work folder.
Any ideas?
Next step is trying to do remote powershell debugging to see if that gives any insight into where in bootstrap things go wrong.