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 246 forks source link

Exception calling "DownloadString" with "1" argument(s): "The remote name could not be resolved: 'bccontainerhelper.azureedge.net'" #3503

Closed ktast closed 6 months ago

ktast commented 6 months ago

Describe the issue When running the build pipeline, I am getting the error ""DownloadString" with "1" argument(s): "The remote name could not be resolved: 'bccontainerhelper.azureedge.net'"" on step Run Pipeline.

Scripts used to create container and cause the issue


scripts/Install-BcContainerHelper.ps1

**Full output of scripts**
2024-04-23T16:46:41.5344643Z ##[section]Starting: Run Pipeline
2024-04-23T16:46:41.5351164Z ==============================================================================
2024-04-23T16:46:41.5351338Z Task         : PowerShell
2024-04-23T16:46:41.5351407Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2024-04-23T16:46:41.5351509Z Version      : 2.237.5
2024-04-23T16:46:41.5351597Z Author       : Microsoft Corporation
2024-04-23T16:46:41.5351677Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2024-04-23T16:46:41.5351793Z ==============================================================================
2024-04-23T16:46:42.9824387Z Generating script.
2024-04-23T16:46:43.0883654Z Formatted command: . 'D:\a\1\s\scripts\DevOps-Pipeline.ps1' -environment 'AzureDevOps' -version "ci" -appBuild 10124 -appRevision 0 -installApps "https://prdbcpublishing.blob.core.windows.net/mde-common-dev/latest/apps.zip" -installTestApps "https://prdbcpublishing.blob.core.windows.net/mde-common-dev/latest/testapps.zip"
2024-04-23T16:46:43.1421833Z ========================== Starting Command Output ===========================
2024-04-23T16:46:43.1808899Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\6cb95cad-0adc-4711-a359-f1c7dbb0f01b.ps1'"
2024-04-23T16:46:43.8095030Z Set artifact = bcartifacts//22.0.54157.54941/us
2024-04-23T16:46:43.8100328Z Set pipelineName = MDE Sales-ci
2024-04-23T16:46:43.8696793Z Set previousApps = ''
2024-04-23T16:46:43.8708102Z Set appSourceCopMandatoryAffixes = ''
2024-04-23T16:46:43.8720371Z Set appSourceCopSupportedCountries = ''
2024-04-23T16:46:43.8754913Z Set appFolders = 'Sales'
2024-04-23T16:46:43.8791427Z Set testFolders = 'Sales_Test'
2024-04-23T16:46:43.8826941Z Set memoryLimit = '6G'
2024-04-23T16:46:43.8862533Z Set additionalCountries = ''
2024-04-23T16:46:43.8875110Z Set genericImageName = ''
2024-04-23T16:46:43.8910388Z Set vaultNameForLocal = 'MDE-BuildVariables'
2024-04-23T16:46:43.8943465Z Set bcContainerHelperVersion = 'latest'
2024-04-23T16:46:43.8980838Z Set containerName = 'bcdev01'
2024-04-23T16:46:43.9041989Z Set installTestRunner = True
2024-04-23T16:46:43.9104730Z Set installTestFramework = False
2024-04-23T16:46:43.9141107Z Set installTestLibraries = True
2024-04-23T16:46:43.9178750Z Set installPerformanceToolkit = False
2024-04-23T16:46:43.9214884Z Set enableCodeCop = False
2024-04-23T16:46:43.9248168Z Set enableAppSourceCop = False
2024-04-23T16:46:43.9281650Z Set enablePerTenantExtensionCop = True
2024-04-23T16:46:43.9321038Z Set enableUICop = True
2024-04-23T16:46:43.9360701Z Set doNotSignApps = True
2024-04-23T16:46:43.9373978Z Set doNotRunTests = False
2024-04-23T16:46:43.9408554Z Set cacheImage = True
2024-04-23T16:46:43.9442996Z Set CreateRuntimePackages = True
2024-04-23T16:46:44.4430118Z ##[error]D:\a\1\s\scripts\DevOps-Pipeline.ps1 : Exception calling "DownloadString" with "1" argument(s): "The remote name could 
not be resolved: 'bccontainerhelper.azureedge.net'"
At D:\a\_temp\6cb95cad-0adc-4711-a359-f1c7dbb0f01b.ps1:4 char:1
+ . 'D:\a\1\s\scripts\DevOps-Pipeline.ps1' -environment 'AzureDevOps' - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [DevOps-Pipeline.ps1], MethodInvocationException
    + FullyQualifiedErrorId : WebException,DevOps-Pipeline.ps1
2024-04-23T16:46:44.5223756Z ##[error]PowerShell exited with code '1'.

**Additional context**
- does it happen all the time?
It started happening yesterday
- did it use to work?
-Yes, did multiple builds last week with no issues
ktast commented 6 months ago

https://github.com/microsoft/navcontainerhelper/issues/3499

Solution:

$bcbaseurl = "https://bccontainerhelper.azureedge.net/public"

$bcbaseurl = "https://bccontainerhelper.blob.core.windows.net/public"