openalm / Extension-UtilitiesPack

Release Management utility tasks
Other
34 stars 38 forks source link

Tokenizer doesn't work with on-premise build server #58

Closed ijabit closed 8 years ago

ijabit commented 8 years ago

I'm using the latest version and when running Tokenizer on a hosted release it works fine. But if I release from our build server on premise, I get this error:

2016-09-29T14:16:20.6396150Z C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 
([scriptblock]::Create(
'if (!$PSHOME) { 
                $null = Get-Item -LiteralPath ''variable:PSHOME'' } 
else { 
Import-Module -Name ([System.IO.Path]::Combine($PSHOME, ''Modules\Microsoft.PowerShell.Management\Microsoft.PowerShell.Management.psd1'')) ; 
Import-Module -Name ([System.IO.Path]::Combine($PSHOME, ''Modules\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psd1'')) }')) 2>&1 | 
ForEach-Object { Write-Verbose $_.Exception.Message -Verbose } ; $env:TF_BUILD = 'True' ; 
Import-Module -Name 'D:\BuildAgent1\tasks\Tokenizer\2.0.0\ps_modules\VstsTaskSdk\VstsTaskSdk.psd1' -ArgumentList @{ NonInteractive = $true } 
-ErrorAction Stop ; $VerbosePreference = 'SilentlyContinue' ; $DebugPreference = 'SilentlyContinue' ; Invoke-VstsTaskScript -ScriptBlock 
([scriptblock]::Create('. ''D:\BuildAgent1\tasks\Tokenizer\2.0.0\tokenize-ps3.ps1'''))"

2016-09-29T14:16:22.9052321Z ##[error]**Index operation failed; the array index evaluated to null.**

2016-09-29T14:16:22.9521102Z Finishing task: Tokenizer

2016-09-29T14:16:22.9833588Z ##[error]System.Exception: Task Tokenizer failed. This caused the job to fail. Look at the logs for the task for more details.

2016-09-29T14:16:22.9833588Z ##[error]   at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.Run(IJobContext jobContext, IJobRequest job, IJobExtension jobExtension, CancellationTokenSource tokenSource)

Is it expecting a certain environment variable to be present, or a certain version of PowerShell (we have version 4.0)?

ijabit commented 8 years ago

Bump

harshil93 commented 8 years ago

I see that you are using the latest version of the task 2.0.0 ( which is yet to be released on market place) which is supported only on the agents > 2.104.2

Can you please confirm that you are using old agent.

ijabit commented 8 years ago

The agent we are using in our on-premise builds is version 1.105.6. So that must be the problem? Thanks!

harshil93 commented 8 years ago

Yes in that case, you should use the vsix which you can download from the market place instead of the one in this repo. I am working on a way by which this compat could be ensured only after it I will release it to market place

ijabit commented 8 years ago

Unfortunately, that version doesn't support secret variables, which is why we are using this version. Any idea when the new version, with secret variable support, will be released?

harshil93 commented 8 years ago

@ijabit I will see if I can speed up the process somehow.