kine / NVRAppDevOps

Navertica DevOps scripts for managing Microsoft Dynamics 365 Business Central Apps
31 stars 29 forks source link

Get-ContainerImageCurrentness NullArray errors #27

Closed TrippyZ closed 4 years ago

TrippyZ commented 4 years ago

I am a new user. Cloned today and get the following errors; PS C:\Users\admincwatson\NVRAppDevOps\MSDyn365BC_AppTemplate> Read-ALConfiguration -path . | Init-ALEnvironment Running .\Scripts\Settings.ps1 ... Build is Cannot index into a null array. At C:\Users\admincwatson\Documents\WindowsPowerShell\Modules\NVRAppDevOps\0.9.93\Get-ContainerImageCurrentness.ps1:23 char:9

Cannot index into a null array. At C:\Users\admincwatson\Documents\WindowsPowerShell\Modules\NVRAppDevOps\0.9.93\Get-ContainerImageCurrentness.ps1:24 char:9

Cannot index into a null array. At C:\Users\admincwatson\Documents\WindowsPowerShell\Modules\NVRAppDevOps\0.9.93\Get-ContainerImageCurrentness.ps1:25 char:9

Cannot index into a null array. At C:\Users\admincwatson\Documents\WindowsPowerShell\Modules\NVRAppDevOps\0.9.93\Get-ContainerImageCurrentness.ps1:26 char:9

Cannot read data about the image from server, rather pulling

TrippyZ commented 4 years ago

When run in the pipeline I get a more compact error at the prepare environment step; ========================= Starting Command Output =========================== "C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'c:\agent_temp\4511780b-b2a2-4285-95c5-4a4647d723e5.ps1'" WARNING: The names of some imported commands from the module 'navcontainerhelper' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb. Running .\Scripts\Settings.ps1 ... TF_BUILD set, running under agent, enforcing Build flag Build is true Using passed password and Windows authentication

[error]Get-ContainerImageCurrentness : Cannot index into a null array.

At C:\Users\agent\Documents\WindowsPowerShell\Modules\NVRAppDevOps\0.9.93\Init-ALEnvironment.ps1:176 char:19

TrippyZ commented 4 years ago

Image name need updating in settings file and image source naming has been changed

kine commented 4 years ago

Yup, this template is pretty old...

kine commented 4 years ago

May be look rather to https://dev.azure.com/KineNavTechDays/NavTechDays2019/_git/TemplateApp I have used during NAVTechDays 2019 and have even updated Azure DevOps YAML pipelines.

TrippyZ commented 4 years ago

Thanks for the link to the devops repo, I had been looking for that.

Incidentally I had closed this issue because I figured out the problem. The null array was because of;

$ImageName = 'microsoft/bcsandbox'

in settings.ps1. That image no longer exists. Perhaps, if you have a moment, you could update it to 'mcr.microsoft.com/businesscentral/sandbox' which does work. It is a rather confusing error for a new user but this change solves it.

I am now up and running but a couple of little problems to solve 'environmentally'.