From 2fdb4315eda55b9bbf7ed9ebc398bd67d608cd85 Mon Sep 17 00:00:00 2001 From: Freddy Kristiansen Date: Mon, 13 Nov 2023 00:22:05 +0100 Subject: [PATCH] Issue #3219 (#3227) Fix for issue #3219 Co-authored-by: freddydk --- AppHandling/Run-AlValidation.ps1 | 16 ++++++++-------- ReleaseNotes.txt | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/AppHandling/Run-AlValidation.ps1 b/AppHandling/Run-AlValidation.ps1 index fc8cd17a7..fb87d6ccd 100644 --- a/AppHandling/Run-AlValidation.ps1 +++ b/AppHandling/Run-AlValidation.ps1 @@ -25,9 +25,9 @@ .Parameter ValidateCurrent Include this switch if you want to also validate against current version of Business Central .Parameter ValidateNextMinor - Include this switch if you want to also validate against next minor version of Business Central. If you include this switch you need to specify a sasToken for insider builds as well. + Include this switch if you want to also validate against next minor version of Business Central. .Parameter ValidateNextMajor - Include this switch if you want to also validate against next major version of Business Central. If you include this switch you need to specify a sasToken for insider builds as well. + Include this switch if you want to also validate against next major version of Business Central. .Parameter failOnError Include this switch if you want to fail on the first error instead of returning all errors to the caller .Parameter includeWarnings @@ -35,6 +35,7 @@ .Parameter doNotIgnoreInfos Include this switch if you don't want to ignore Infos (if you want to include Infos) .Parameter sasToken + OBSOLETE - sasToken is no longer needed Shared Access Service Token for accessing insider artifacts of Business Central. Available on http://aka.ms/collaborate .Parameter countries Array or comma separated list of country codes to validate against @@ -47,7 +48,7 @@ .Parameter vsixFile Specify a URL or path to a .vsix file in order to override the .vsix file in the image with this. Use Get-LatestAlLanguageExtensionUrl to get latest AL Language extension from Marketplace. - Use Get-AlLanguageExtensionFromArtifacts -artifactUrl (Get-BCArtifactUrl -select NextMajor -sasToken $insiderSasToken) to get latest insider .vsix + Use Get-AlLanguageExtensionFromArtifacts -artifactUrl (Get-BCArtifactUrl -select NextMajor -accept_insiderEULA) to get latest insider .vsix Use . to specify that you want to use the AL Language extension from the container spun up for validation Default is to use the latest AL Language extension from Marketplace for non-insider containers and the Language extension in the container for insider containers .Parameter skipVerification @@ -95,6 +96,7 @@ Param( [switch] $failOnError, [switch] $includeWarnings, [switch] $doNotIgnoreInfos, + [Obsolete("sasToken is no longer needed")] [string] $sasToken = "", [Parameter(Mandatory=$true)] $countries, @@ -121,7 +123,6 @@ function DetermineArtifactsToUse { Param( [string] $version = "", [string] $select = "Current", - [string] $sasToken = "", [string[]] $countries = @("us"), [switch] $throw ) @@ -138,11 +139,10 @@ Write-Host -ForegroundColor Yellow @' $minsto = 'bcartifacts' $minsel = $select - $mintok = $sasToken if ($countries) { $minver = $null $countries | ForEach-Object { - $url = Get-BCArtifactUrl -version $version -country $_ -select $select -sasToken $sasToken | Select-Object -First 1 + $url = Get-BCArtifactUrl -version $version -country $_ -select $select -accept_insiderEula | Select-Object -First 1 if (!($url)) { Write-Host -ForegroundColor Yellow "WARNING: NextMajor artifacts doesn't exist for $_" } @@ -154,7 +154,6 @@ Write-Host -ForegroundColor Yellow @' $minver = $ver $minsto = $url.Split('/')[2].Split('.')[0] $minsel = "Latest" - $mintok = $url.Split('?')[1]; if ($mintok) { $mintok = "?$mintok" } } } } @@ -169,7 +168,7 @@ Write-Host -ForegroundColor Yellow @' $version = $minver.ToString() } } - $artifactUrl = Get-BCArtifactUrl -storageAccount $minsto -version $version -country $countries[0] -select $minsel -sasToken $mintok | Select-Object -First 1 + $artifactUrl = Get-BCArtifactUrl -storageAccount $minsto -version $version -country $countries[0] -select $minsel -accept_insiderEula | Select-Object -First 1 if (!($artifactUrl)) { if ($throw) { throw "Unable to locate artifacts" } } @@ -452,6 +451,7 @@ Measure-Command { $Parameters = @{ "accept_eula" = $true + "accept_insiderEula" = $true "containerName" = $containerName "artifactUrl" = $artifactUrl "useGenericImage" = $useGenericImage diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index c401655c4..80b668ad5 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -2,6 +2,7 @@ New-AadAppsForBC doesn't work with the newer versions of Microsoft.Graph module (where the type of the accesstoken parameter has changed) New-AppSourceSubmission has a new parameter -doNotUpdateVersionNumber to support hotfixes in AppSource for earlier versions New-AppSourceSubmission obsoleted parameter -doNotCheckVersionNumber that was previously used for hotfixes, because of a change in AppSource +Issue 3219 Run-AlValidation cannot validate against Next Major without an insider Sas token 6.0.0 Add parameter -accept_insiderEULA on New-BcContainer, Get-BcArtifactUrl and Run-AlPipeline to accept the insider EULA (https://go.microsoft.com/fwlink/?linkid=2245051) instead of using the insider SAS token.