microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
385 stars 247 forks source link

CI/CD Hol does not mention to create the insiderSasToken secret in the Key Vault #2101

Closed srenders closed 3 years ago

srenders commented 3 years ago

Describe the issue The CI/CD Hol does not mention to create the insiderSasToken secret in the Key Vault

Scripts used to create container and cause the issue

Local-DevEnv.ps1

Full output of scripts

PS C:\Users\Steven\Documents\AL\MyProject\MyFirstApp\scripts> .\Local-DevEnv.ps1
Set artifact = //18.0.23013.24016/us
Set pipelineName = MyApp-ci
Set containerName = myapp-ci
Set installApps = ''
Set installTestApps = ''
Set previousApps = ''
Set appSourceCopMandatoryAffixes = ''
Set appSourceCopSupportedCountries = ''
Set appFolders = 'app,base'
Set testFolders = 'test'
Set memoryLimit = '6G'
Set additionalCountries = ''
Set genericImageName = ''
Set vaultNameForLocal = 'BuildVarialblesII'
Set bcContainerHelperVersion = 'preview'
Set installTestRunner = True
Set installTestFramework = False
Set installTestLibraries = False
Set installPerformanceToolkit = False
Set enableCodeCop = False
Set enableAppSourceCop = False
Set enablePerTenantExtensionCop = True
Set enableUICop = True
Set doNotSignApps = True
Set doNotRunTests = False
Set cacheImage = True
Set CreateRuntimePackages = True
BcContainerHelper version 2.0.16-preview486
Get Secret LicenseFileSecret
C:\Users\JensUlrikPedersen\Documents\AL\MyProject\MyFirstApp\scripts\Local-DevEnv.ps1 : Exception calling "SecureStringToBSTR" with "1" argument(s): "En værdi må ikke være null.
Parameternavn: s"
At line:1 char:1
+ .\Local-DevEnv.ps1
+ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Local-DevEnv.ps1], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException,Local-DevEnv.ps1

Additional context

When you don't have a insiderSasToken secret in the Key Vault the script Local-DevEnv.ps1 always throws an error: Exception calling "SecureStringToBSTR" with "1" argument(s) After creating the insiderSasToken secret in the Key Vault the script ran without errors.

I also need to mention that I was unable to run the script in the VSCode Powershell Terminal. I had to open and run it in the ISE.

freddydk commented 3 years ago

Thanks Steven I am working on a next-gen for CI/CD and these things have been fixed in that one.