From 793e1582d0ad16cc3929d2fd6c059e3ff47baa5a Mon Sep 17 00:00:00 2001 From: mazhelez Date: Thu, 10 Aug 2023 06:14:08 +0000 Subject: [PATCH] Updated AL-Go System Files --- .github/RELEASENOTES.copy.md | 29 ++++ .github/workflows/CICD.yaml | 133 +++++++++--------- .github/workflows/IncrementVersionNumber.yaml | 43 +++++- .github/workflows/PullRequestHandler.yaml | 23 ++- .../workflows/UpdateGitHubGoSystemFiles.yaml | 30 ++-- .github/workflows/_BuildALGoProject.yaml | 71 +++++----- .../.AL-Go/cloudDevEnv.ps1 | 7 +- .../.AL-Go/localDevEnv.ps1 | 7 +- System Application/.AL-Go/cloudDevEnv.ps1 | 7 +- System Application/.AL-Go/localDevEnv.ps1 | 7 +- Test Framework/.AL-Go/cloudDevEnv.ps1 | 7 +- Test Framework/.AL-Go/localDevEnv.ps1 | 7 +- Test Stability Tools/.AL-Go/cloudDevEnv.ps1 | 7 +- Test Stability Tools/.AL-Go/localDevEnv.ps1 | 7 +- 14 files changed, 214 insertions(+), 171 deletions(-) diff --git a/.github/RELEASENOTES.copy.md b/.github/RELEASENOTES.copy.md index 39e5abe7f0..bd8e13a27a 100644 --- a/.github/RELEASENOTES.copy.md +++ b/.github/RELEASENOTES.copy.md @@ -9,9 +9,38 @@ Issue 558 CI/CD attempts to deploy from feature branch Issue 559 Changelog includes wrong commits Publish to AppSource fails if publisher name or app name contains national or special characters Issue 598 Cleanup during flush if build pipeline doesn't cleanup properly +Issue 608 When creating a release, throw error if no new artifacts have been added +Issue 528 Give better error messages when uploading to storage accounts +Create Online Development environment workflow failed in AppSource template unless AppSourceCopMandatoryAffixes is defined in repository settings file +Create Online Development environment workflow didn't have a project parameter and only worked for single project repositories +Create Online Development environment workflow didn't work if runs-on was set to Linux +Special characters are not supported in RepoName, Project names or other settings - Use UTF8 encoding to handle special characters in GITHUB_OUTPUT and GITHUB_ENV + +### Issue 555 +AL-Go contains several workflows, which create a Pull Request or pushes code directly. +All (except Update AL-Go System Files) earlier used the GITHUB_TOKEN to create the PR or commit. +The problem using GITHUB_TOKEN is that is doesn't trigger a pull request build or a commit build. +This is by design: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow +Now, you can set the checkbox called Use GhTokenWorkflow to allowing you to use the GhTokenWorkflow instead of the GITHUB_TOKEN - making sure that workflows are triggered ### New Settings - `keyVaultCodesignCertificateName`: With this setting you can delegate the codesigning to an Azure Key Vault. This can be useful if your certificate has to be stored in a Hardware Security Module +- `PullRequestTrigger`: With this setting you can set which trigger to use for Pull Request Builds. By default AL-Go will use pull_request_target. + +### New Actions +- `DownloadProjectDependencies`: Downloads the dependency apps for a given project and build mode. + +### Settings and Secrets in AL-Go for GitHub +In earlier versions of AL-Go for GitHub, all settings were available as individual environment variables to scripts and overrides, this is no longer the case. +Settings were also available as one compressed JSON structure in env:Settings, this is still the case. +Settings can no longer contain line breaks. It might have been possible to use line breaks earlier, but it would likely have unwanted consequences. +Use `$settings = $ENV:Settings | ConvertFrom-Json` to get all settings in PowerShell. + +In earlier versions of AL-Go for GitHub, all secrets requested by AL-Go for GitHub were available as individual environment variables to scripts and overrides, this is no longer the case. +As described in bug 647, all secrets available to the workflow were also available in env:_Secrets, this is no longer the case. +All requested secrets were also available (base64 encoded) as one compressed JSON structure in env:Secrets, this is still the case. +Use `$secrets = $ENV:Secrets | ConvertFrom-Json` to get all requested secrets in PowerShell. +You cannot get to any secrets that weren't requested by AL-Go for GitHub. ## v3.1 diff --git a/.github/workflows/CICD.yaml b/.github/workflows/CICD.yaml index 3cf8b56ea5..5f26e13799 100644 --- a/.github/workflows/CICD.yaml +++ b/.github/workflows/CICD.yaml @@ -27,7 +27,6 @@ jobs: runs-on: [ windows-latest ] outputs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} - settings: ${{ steps.ReadSettings.outputs.SettingsJson }} environments: ${{ steps.ReadSettings.outputs.EnvironmentsJson }} environmentCount: ${{ steps.ReadSettings.outputs.EnvironmentCount }} deliveryTargets: ${{ steps.DetermineDeliveryTargets.outputs.DeliveryTargetsJson }} @@ -47,27 +46,28 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@preview + uses: microsoft/AL-Go/Actions/WorkflowInitialize@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell eventId: "DO0091" - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@preview + uses: microsoft/AL-Go/Actions/ReadSettings@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} getEnvironments: '*' + get: type - name: Determine Workflow Depth id: DetermineWorkflowDepth run: | - Add-Content -Path $env:GITHUB_OUTPUT -Value "WorkflowDepth=$($env:workflowDepth)" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "WorkflowDepth=$($env:workflowDepth)" - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@preview + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell maxBuildDepth: ${{ env.workflowDepth }} @@ -75,30 +75,26 @@ jobs: - name: Determine Delivery Target Secrets id: DetermineDeliveryTargetSecrets run: | - $ErrorActionPreference = "STOP" - Set-StrictMode -version 2.0 + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 $deliveryTargetSecrets = @('GitHubPackagesContext','NuGetContext','StorageContext','AppSourceContext') $namePrefix = 'DeliverTo' Get-Item -Path (Join-Path $ENV:GITHUB_WORKSPACE ".github/$($namePrefix)*.ps1") | ForEach-Object { $deliveryTarget = [System.IO.Path]::GetFileNameWithoutExtension($_.Name.SubString($namePrefix.Length)) $deliveryTargetSecrets += @("$($deliveryTarget)Context") } - Add-Content -Path $env:GITHUB_OUTPUT -Value "Secrets=$($deliveryTargetSecrets -join ',')" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "Secrets=$($deliveryTargetSecrets -join ',')" - name: Read secrets - uses: microsoft/AL-Go-Actions/ReadSecrets@preview - env: - secrets: ${{ toJson(secrets) }} + uses: microsoft/AL-Go/Actions/ReadSecrets@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell - settingsJson: ${{ env.Settings }} - secrets: ${{ steps.DetermineDeliveryTargetSecrets.outputs.Secrets }} + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: ${{ steps.DetermineDeliveryTargetSecrets.outputs.Secrets }} - name: Determine Delivery Targets id: DetermineDeliveryTargets run: | - $ErrorActionPreference = "STOP" - Set-StrictMode -version 2.0 + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 $deliveryTargets = @('GitHubPackages','NuGet','Storage') if ($env:type -eq "AppSource App") { $continuousDelivery = $false @@ -119,14 +115,14 @@ jobs: $deliveryTarget = [System.IO.Path]::GetFileNameWithoutExtension($_.Name.SubString($namePrefix.Length)) $deliveryTargets += @($deliveryTarget) } + $settings = $env:Settings | ConvertFrom-Json + $secrets = $env:Secrets | ConvertFrom-Json $deliveryTargets = @($deliveryTargets | Select-Object -unique | Where-Object { $include = $false Write-Host "Check DeliveryTarget $_" $contextName = "$($_)Context" - $deliveryContext = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String([System.Environment]::GetEnvironmentVariable($contextName))) - if ($deliveryContext) { + if ($secrets."$contextName") { $settingName = "DeliverTo$_" - $settings = $env:Settings | ConvertFrom-Json if (($settings.PSObject.Properties.Name -eq $settingName) -and ($settings."$settingName".PSObject.Properties.Name -eq "Branches")) { Write-Host "Branches:" $settings."$settingName".Branches | ForEach-Object { @@ -147,11 +143,11 @@ jobs: }) $deliveryTargetsJson = $deliveryTargets | ConvertTo-Json -Depth 99 -compress if ($deliveryTargets.Count -lt 2) { $deliveryTargetsJson = "[$($deliveryTargetsJson)]" } - Add-Content -Path $env:GITHUB_OUTPUT -Value "DeliveryTargetsJson=$deliveryTargetsJson" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "DeliveryTargetsJson=$deliveryTargetsJson" Write-Host "DeliveryTargetsJson=$deliveryTargetsJson" - Add-Content -Path $env:GITHUB_OUTPUT -Value "DeliveryTargetCount=$($deliveryTargets.Count)" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "DeliveryTargetCount=$($deliveryTargets.Count)" Write-Host "DeliveryTargetCount=$($deliveryTargets.Count)" - Add-Content -Path $env:GITHUB_ENV -Value "DeliveryTargets=$deliveryTargetsJson" + Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "DeliveryTargets=$deliveryTargetsJson" CheckForUpdates: runs-on: [ windows-latest ] @@ -161,14 +157,14 @@ jobs: uses: actions/checkout@v3 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@preview + uses: microsoft/AL-Go/Actions/ReadSettings@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} get: templateUrl - name: Check for updates to AL-Go system files - uses: microsoft/AL-Go-Actions/CheckForUpdates@preview + uses: microsoft/AL-Go/Actions/CheckForUpdates@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} @@ -191,7 +187,7 @@ jobs: project: ${{ matrix.project }} buildMode: ${{ matrix.buildMode }} projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} - secrets: 'licenseFileUrl,insiderSasToken,codeSignCertificateUrl,codeSignCertificatePassword,keyVaultCertificateUrl,keyVaultCertificatePassword,keyVaultClientId,storageContext,gitHubPackagesContext' + secrets: 'licenseFileUrl,insiderSasToken,codeSignCertificateUrl,codeSignCertificatePassword,keyVaultCertificateUrl,keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} publishArtifacts: ${{ github.ref_name == 'main' || startswith(github.ref_name, 'release/') || needs.Initialization.outputs.deliveryTargetCount > 0 || needs.Initialization.outputs.environmentCount > 0 }} signArtifacts: true @@ -214,7 +210,7 @@ jobs: project: ${{ matrix.project }} buildMode: ${{ matrix.buildMode }} projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} - secrets: 'licenseFileUrl,insiderSasToken,codeSignCertificateUrl,codeSignCertificatePassword,keyVaultCertificateUrl,keyVaultCertificatePassword,keyVaultClientId,storageContext,gitHubPackagesContext' + secrets: 'licenseFileUrl,insiderSasToken,codeSignCertificateUrl,codeSignCertificatePassword,keyVaultCertificateUrl,keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} publishArtifacts: ${{ github.ref_name == 'main' || startswith(github.ref_name, 'release/') || needs.Initialization.outputs.deliveryTargetCount > 0 || needs.Initialization.outputs.environmentCount > 0 }} signArtifacts: true @@ -240,44 +236,42 @@ jobs: - name: EnvName id: envName run: | - $ErrorActionPreference = "STOP" - Set-StrictMode -version 2.0 + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 $envName = '${{ matrix.environment }}'.split(' ')[0] - Add-Content -Path $env:GITHUB_OUTPUT -Value "envName=$envName" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "envName=$envName" - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@preview + uses: microsoft/AL-Go/Actions/ReadSettings@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell - name: Read secrets - uses: microsoft/AL-Go-Actions/ReadSecrets@preview - env: - secrets: ${{ toJson(secrets) }} + uses: microsoft/AL-Go/Actions/ReadSecrets@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell - settingsJson: ${{ env.Settings }} - secrets: '${{ steps.envName.outputs.envName }}-AuthContext,${{ steps.envName.outputs.envName }}_AuthContext,AuthContext,${{ steps.envName.outputs.envName }}-EnvironmentName,${{ steps.envName.outputs.envName }}_EnvironmentName,EnvironmentName,projects' + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: '${{ steps.envName.outputs.envName }}-AuthContext,${{ steps.envName.outputs.envName }}_AuthContext,AuthContext,${{ steps.envName.outputs.envName }}-EnvironmentName,${{ steps.envName.outputs.envName }}_EnvironmentName,EnvironmentName,projects' - name: AuthContext id: authContext run: | - $ErrorActionPreference = "STOP" - Set-StrictMode -version 2.0 + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 + $settings = $env:Settings | ConvertFrom-Json $envName = '${{ steps.envName.outputs.envName }}' - $deployToSettingStr = [System.Environment]::GetEnvironmentVariable("DeployTo$envName") - if ($deployToSettingStr) { - $deployToSetting = $deployToSettingStr | ConvertFrom-Json + $settingsName = "DeployTo$envName" + if ($settings.PSObject.Properties.name -eq $settingsName) { + $deployToSetting = $settings."$settingsName" | ConvertFrom-Json } else { $deployToSetting = [PSCustomObject]@{} } + $secrets = $env:Secrets | ConvertFrom-Json $authContext = $null "$($envName)-AuthContext", "$($envName)_AuthContext", "AuthContext" | ForEach-Object { if (!($authContext)) { - $authContext = [System.Environment]::GetEnvironmentVariable($_) - if ($authContext) { + if ($secrets."$_") { Write-Host "Using $_ secret as AuthContext" + $authContext = $secrets."$_" } } } @@ -292,10 +286,10 @@ jobs: $environmentName = $null "$($envName)-EnvironmentName", "$($envName)_EnvironmentName", "EnvironmentName" | ForEach-Object { if (!($EnvironmentName)) { - $EnvironmentName = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String([System.Environment]::GetEnvironmentVariable($_))) - if ($EnvironmentName) { + if ($secrets."$_") { Write-Host "Using $_ secret as EnvironmentName" - Write-Host "Please consider using the DeployTo$_ setting instead, where you can specify EnvironmentName, projects and branches" + Write-Host "::Warning::Please consider using the $settingsName setting, where you can specify EnvironmentName, projects and branches - instead of specifying the EnvironmentName in a Secret." + $EnvironmentName = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($secrets."$_")) } } } @@ -305,17 +299,21 @@ jobs: } $environmentName = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(($environmentName + '${{ matrix.environment }}'.SubString($envName.Length)).ToUpperInvariant())) + $projects = '' if (("$deployToSetting" -ne "") -and $deployToSetting.PSObject.Properties.name -eq "projects") { $projects = $deployToSetting.projects } - else { - $projects = [System.Environment]::GetEnvironmentVariable("$($envName)-projects") - if (-not $projects) { - $projects = [System.Environment]::GetEnvironmentVariable("$($envName)_Projects") - if (-not $projects) { - $projects = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String([System.Environment]::GetEnvironmentVariable('projects'))) - } - } + elseif ($settings.PSObject.Properties.name -eq "$($envName)-projects") { + $projects = $settings."$($envName)-projects" + Write-Host "::Warning::Please consider using the $settingsName setting, where you can specify EnvironmentName, projects and branches - instead of specifying the Projects in Setting '$($envName)-projects'" + } + elseif ($settings.PSObject.Properties.name -eq "$($envName)_projects") { + $projects = $settings."$($envName)_projects" + Write-Host "::Warning::Please consider using the $settingsName setting, where you can specify EnvironmentName, projects and branches - instead of specifying the Projects in Setting '$($envName)_projects'" + } + elseif ($secrets.projects) { + $projects = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($secrets.projects)) + Write-Host "::Warning::Please consider using the $settingsName setting, where you can specify EnvironmentName, projects and branches - instead of specifying the Projects in the secret 'project'" } if ($projects -eq '' -or $projects -eq '*') { $projects = '*' @@ -325,16 +323,15 @@ jobs: $projects = ($projects.Split(',') | Where-Object { $buildProjects -contains $_ }) -join ',' } - Add-Content -Path $env:GITHUB_OUTPUT -Value "authContext=$authContext" - Write-Host "authContext=$authContext" - Add-Content -Path $env:GITHUB_OUTPUT -Value "environmentName=$environmentName" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "authContext=$authContext" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "environmentName=$environmentName" Write-Host "environmentName=$([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($environmentName)))" Write-Host "environmentName (as Base64)=$environmentName" - Add-Content -Path $env:GITHUB_OUTPUT -Value "projects=$projects" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "projects=$projects" Write-Host "projects=$projects" - name: Deploy - uses: microsoft/AL-Go-Actions/Deploy@preview + uses: microsoft/AL-Go/Actions/Deploy@d15c25e25c4b0033da9f99970e3a420e231f7fbc env: AuthContext: ${{ steps.authContext.outputs.authContext }} with: @@ -363,31 +360,29 @@ jobs: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@preview + uses: microsoft/AL-Go/Actions/ReadSettings@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell - name: Read secrets - uses: microsoft/AL-Go-Actions/ReadSecrets@preview - env: - secrets: ${{ toJson(secrets) }} + uses: microsoft/AL-Go/Actions/ReadSecrets@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell - settingsJson: ${{ env.Settings }} - secrets: '${{ matrix.deliveryTarget }}Context' + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: '${{ matrix.deliveryTarget }}Context' - name: DeliveryContext id: deliveryContext run: | - $ErrorActionPreference = "STOP" - Set-StrictMode -version 2.0 + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 + $secrets = $env:Secrets | ConvertFrom-Json $contextName = '${{ matrix.deliveryTarget }}Context' - $deliveryContext = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String([System.Environment]::GetEnvironmentVariable($contextName))) - Add-Content -Path $env:GITHUB_OUTPUT -Value "deliveryContext=$deliveryContext" + $deliveryContext = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($secrets."$contextName")) + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "deliveryContext=$deliveryContext" Write-Host "deliveryContext=$deliveryContext" - name: Deliver - uses: microsoft/AL-Go-Actions/Deliver@preview + uses: microsoft/AL-Go/Actions/Deliver@d15c25e25c4b0033da9f99970e3a420e231f7fbc env: deliveryContext: ${{ steps.deliveryContext.outputs.deliveryContext }} with: @@ -407,7 +402,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@preview + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell eventId: "DO0091" diff --git a/.github/workflows/IncrementVersionNumber.yaml b/.github/workflows/IncrementVersionNumber.yaml index d633050074..d754228f44 100644 --- a/.github/workflows/IncrementVersionNumber.yaml +++ b/.github/workflows/IncrementVersionNumber.yaml @@ -16,6 +16,9 @@ on: description: Direct COMMIT (Y/N) required: false default: 'N' + useGhTokenWorkflow: + description: Use GhTokenWorkflow for Pull Request/COMMIT + type: boolean permissions: contents: write @@ -38,15 +41,49 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@preview + uses: microsoft/AL-Go/Actions/WorkflowInitialize@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell eventId: "DO0096" + - name: Read settings + uses: microsoft/AL-Go/Actions/ReadSettings@d15c25e25c4b0033da9f99970e3a420e231f7fbc + if: github.event.inputs.useGhTokenWorkflow == 'true' + with: + shell: powershell + parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} + + - name: Read secrets + uses: microsoft/AL-Go/Actions/ReadSecrets@d15c25e25c4b0033da9f99970e3a420e231f7fbc + if: github.event.inputs.useGhTokenWorkflow == 'true' + with: + shell: powershell + parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: 'ghTokenWorkflow' + + - name: CalculateToken + id: CalculateToken + env: + useGhTokenWorkflow: ${{ github.event.inputs.useGhTokenWorkflow }} + run: | + $ghToken = '${{ secrets.GITHUB_TOKEN }}' + if ($env:useGhTokenWorkflow -eq 'true') { + $secrets = $env:Secrets | ConvertFrom-Json + if ($secrets.GHTOKENWORKFLOW) { + $ghToken = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($secrets.GHTOKENWORKFLOW)) + } + else { + Write-Host "::Warning::GHTOKENWORKFLOW secret not found. Using GITHUB_TOKEN." + } + } + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "ghToken=$ghToken" + - name: Increment Version Number - uses: microsoft/AL-Go-Actions/IncrementVersionNumber@preview + uses: microsoft/AL-Go/Actions/IncrementVersionNumber@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell + token: ${{ steps.CalculateToken.outputs.ghToken }} parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} project: ${{ github.event.inputs.project }} versionNumber: ${{ github.event.inputs.versionNumber }} @@ -54,7 +91,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@preview + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell eventId: "DO0096" diff --git a/.github/workflows/PullRequestHandler.yaml b/.github/workflows/PullRequestHandler.yaml index 915f742afe..9bd0e4c58a 100644 --- a/.github/workflows/PullRequestHandler.yaml +++ b/.github/workflows/PullRequestHandler.yaml @@ -26,7 +26,7 @@ env: jobs: PregateCheck: - if: github.event.pull_request.base.repo.full_name != github.event.pull_request.head.repo.full_name + if: (github.event.pull_request.base.repo.full_name != github.event.pull_request.head.repo.full_name) && (github.event_name != 'pull_request') runs-on: [ windows-latest ] steps: - uses: actions/checkout@v3 @@ -34,11 +34,7 @@ jobs: lfs: true ref: refs/pull/${{ github.event.number }}/merge - - uses: microsoft/AL-Go-Actions/VerifyPRChanges@preview - with: - baseSHA: ${{ github.event.pull_request.base.sha }} - headSHA: ${{ github.event.pull_request.head.sha }} - prbaseRepository: ${{ github.event.pull_request.base.repo.full_name }} + - uses: microsoft/AL-Go/Actions/VerifyPRChanges@d15c25e25c4b0033da9f99970e3a420e231f7fbc Initialization: needs: [ PregateCheck ] @@ -46,7 +42,6 @@ jobs: runs-on: [ windows-latest ] outputs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} - settings: ${{ steps.ReadSettings.outputs.SettingsJson }} githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} @@ -62,14 +57,14 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@preview + uses: microsoft/AL-Go/Actions/WorkflowInitialize@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell eventId: "DO0104" - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@preview + uses: microsoft/AL-Go/Actions/ReadSettings@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} @@ -78,11 +73,11 @@ jobs: - name: Determine Workflow Depth id: DetermineWorkflowDepth run: | - Add-Content -Path $env:GITHUB_OUTPUT -Value "WorkflowDepth=$($env:workflowDepth)" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "WorkflowDepth=$($env:workflowDepth)" - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@preview + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell maxBuildDepth: ${{ env.workflowDepth }} @@ -105,7 +100,7 @@ jobs: project: ${{ matrix.project }} buildMode: ${{ matrix.buildMode }} projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} - secrets: 'licenseFileUrl,insiderSasToken,keyVaultCertificateUrl,keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext' + secrets: 'licenseFileUrl,insiderSasToken,keyVaultCertificateUrl,keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} Build: @@ -126,7 +121,7 @@ jobs: project: ${{ matrix.project }} buildMode: ${{ matrix.buildMode }} projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} - secrets: 'licenseFileUrl,insiderSasToken,keyVaultCertificateUrl,keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext' + secrets: 'licenseFileUrl,insiderSasToken,keyVaultCertificateUrl,keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} PostProcess: @@ -142,7 +137,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@preview + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell eventId: "DO0104" diff --git a/.github/workflows/UpdateGitHubGoSystemFiles.yaml b/.github/workflows/UpdateGitHubGoSystemFiles.yaml index 9f93bc169d..3c8512c6dc 100644 --- a/.github/workflows/UpdateGitHubGoSystemFiles.yaml +++ b/.github/workflows/UpdateGitHubGoSystemFiles.yaml @@ -32,38 +32,35 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@preview + uses: microsoft/AL-Go/Actions/WorkflowInitialize@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell eventId: "DO0098" - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@preview + uses: microsoft/AL-Go/Actions/ReadSettings@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} - get: keyVaultName,ghTokenWorkflowSecretName,templateUrl + get: templateUrl - name: Read secrets - uses: microsoft/AL-Go-Actions/ReadSecrets@preview - env: - secrets: ${{ toJson(secrets) }} + uses: microsoft/AL-Go/Actions/ReadSecrets@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} - settingsJson: ${{ env.Settings }} - secrets: 'ghTokenWorkflow=${{ env.GHTOKENWORKFLOWSECRETNAME }}' + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: 'ghTokenWorkflow' - name: Override templateUrl env: templateUrl: ${{ github.event.inputs.templateUrl }} run: | - $ErrorActionPreference = "STOP" - Set-StrictMode -version 2.0 + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 $templateUrl = $ENV:templateUrl if ($templateUrl) { Write-Host "Using Template Url: $templateUrl" - Add-Content -Path $env:GITHUB_ENV -Value "templateUrl=$templateUrl" + Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "templateUrl=$templateUrl" } - name: Calculate DirectCommit @@ -71,29 +68,28 @@ jobs: directCommit: ${{ github.event.inputs.directCommit }} eventName: ${{ github.event_name }} run: | - $ErrorActionPreference = "STOP" - Set-StrictMode -version 2.0 + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 $directCommit = $ENV:directCommit Write-Host $ENV:eventName if ($ENV:eventName -eq 'schedule') { Write-Host "Running Update AL-Go System Files on a schedule. Setting DirectCommit = Y" $directCommit = 'Y' } - Add-Content -Path $env:GITHUB_ENV -Value "DirectCommit=$directCommit" + Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "DirectCommit=$directCommit" - name: Update AL-Go system files - uses: microsoft/AL-Go-Actions/CheckForUpdates@preview + uses: microsoft/AL-Go/Actions/CheckForUpdates@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} - token: ${{ env.ghTokenWorkflow }} + token: ${{ fromJson(env.Secrets).ghTokenWorkflow }} Update: Y templateUrl: ${{ env.templateUrl }} directCommit: ${{ env.directCommit }} - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@preview + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: powershell eventId: "DO0098" diff --git a/.github/workflows/_BuildALGoProject.yaml b/.github/workflows/_BuildALGoProject.yaml index f5ee08a7ab..01d8d11f8d 100644 --- a/.github/workflows/_BuildALGoProject.yaml +++ b/.github/workflows/_BuildALGoProject.yaml @@ -76,79 +76,78 @@ jobs: with: ref: ${{ inputs.checkoutRef }} lfs: true - - - name: Download thisbuild artifacts - if: inputs.publishThisBuildArtifacts - uses: actions/download-artifact@v3 - with: - path: '.dependencies' - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@preview + uses: microsoft/AL-Go/Actions/ReadSettings@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: ${{ inputs.shell }} parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} project: ${{ inputs.project }} + get: useCompilerFolder,keyVaultCodesignCertificateName,doNotSignApps,artifact - name: Read secrets - uses: microsoft/AL-Go-Actions/ReadSecrets@preview - env: - secrets: ${{ toJson(secrets) }} + if: github.event_name != 'pull_request' + uses: microsoft/AL-Go/Actions/ReadSecrets@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: ${{ inputs.shell }} parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} - settingsJson: ${{ env.Settings }} - secrets: ${{ inputs.secrets }} + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: '${{ inputs.secrets }},appDependencyProbingPathsSecrets' - name: Determine ArtifactUrl - uses: microsoft/AL-Go-Actions/DetermineArtifactUrl@preview + uses: microsoft/AL-Go/Actions/DetermineArtifactUrl@d15c25e25c4b0033da9f99970e3a420e231f7fbc id: determineArtifactUrl with: shell: ${{ inputs.shell }} parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} project: ${{ inputs.project }} - settingsJson: ${{ env.Settings }} - secretsJson: ${{ env.RepoSecrets }} - name: Cache Business Central Artifacts - if: env.useCompilerFolder == 'True' && inputs.useArtifactCache && steps.determineArtifactUrl.outputs.ArtifactCacheKey + if: env.useCompilerFolder == 'True' && inputs.useArtifactCache && env.artifactCacheKey uses: actions/cache@v3 with: path: .artifactcache - key: ${{ steps.determineArtifactUrl.outputs.ArtifactCacheKey }} + key: ${{ env.artifactCacheKey }} + + - name: Download Project Dependencies + id: DownloadProjectDependencies + uses: microsoft/AL-Go/Actions/DownloadProjectDependencies@d15c25e25c4b0033da9f99970e3a420e231f7fbc + with: + shell: ${{ inputs.shell }} + project: ${{ inputs.project }} + buildMode: ${{ inputs.buildMode }} + projectsDependenciesJson: ${{ inputs.projectDependenciesJson }} - name: Run pipeline id: RunPipeline - uses: microsoft/AL-Go-Actions/RunPipeline@preview + uses: microsoft/AL-Go/Actions/RunPipeline@d15c25e25c4b0033da9f99970e3a420e231f7fbc env: BuildMode: ${{ inputs.buildMode }} with: shell: ${{ inputs.shell }} parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} + artifact: ${{ env.artifact }} project: ${{ inputs.project }} - projectDependenciesJson: ${{ inputs.projectDependenciesJson }} - settingsJson: ${{ env.Settings }} - secretsJson: ${{ env.RepoSecrets }} buildMode: ${{ inputs.buildMode }} + installAppsJson: ${{ steps.DownloadProjectDependencies.outputs.DownloadedApps }} + installTestAppsJson: ${{ steps.DownloadProjectDependencies.outputs.DownloadedTestApps }} - name: Sign if: inputs.signArtifacts && env.doNotSignApps == 'False' && env.keyVaultCodesignCertificateName != '' id: sign - uses: microsoft/AL-Go-Actions/Sign@preview + uses: microsoft/AL-Go/Actions/Sign@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: ${{ needs.Initialization.outputs.githubRunnerShell }} azureCredentialsJson: ${{ secrets.AZURE_CREDENTIALS }} - settingsJson: ${{ env.Settings }} pathToFiles: '${{ inputs.project }}/.buildartifacts/Apps/*.app' parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} - name: Calculate Artifact names id: calculateArtifactsNames - uses: microsoft/AL-Go-Actions/CalculateArtifactNames@preview + uses: microsoft/AL-Go/Actions/CalculateArtifactNames@d15c25e25c4b0033da9f99970e3a420e231f7fbc if: success() || failure() with: shell: ${{ inputs.shell }} - settingsJson: ${{ env.Settings }} project: ${{ inputs.project }} buildMode: ${{ inputs.buildMode }} branchName: ${{ github.ref_name }} @@ -176,7 +175,7 @@ jobs: uses: actions/upload-artifact@v3 if: inputs.publishArtifacts with: - name: ${{ env.AppsArtifactsName }} + name: ${{ steps.calculateArtifactsNames.outputs.AppsArtifactsName }} path: '${{ inputs.project }}/.buildartifacts/Apps/' if-no-files-found: ignore @@ -184,7 +183,7 @@ jobs: uses: actions/upload-artifact@v3 if: inputs.publishArtifacts with: - name: ${{ env.DependenciesArtifactsName }} + name: ${{ steps.calculateArtifactsNames.outputs.DependenciesArtifactsName }} path: '${{ inputs.project }}/.buildartifacts/Dependencies/' if-no-files-found: ignore @@ -192,7 +191,7 @@ jobs: uses: actions/upload-artifact@v3 if: inputs.publishArtifacts with: - name: ${{ env.TestAppsArtifactsName }} + name: ${{ steps.calculateArtifactsNames.outputs.TestAppsArtifactsName }} path: '${{ inputs.project }}/.buildartifacts/TestApps/' if-no-files-found: ignore @@ -200,7 +199,7 @@ jobs: uses: actions/upload-artifact@v3 if: (success() || failure()) && (hashFiles(format('{0}/BuildOutput.txt',inputs.project)) != '') with: - name: ${{ env.BuildOutputArtifactsName }} + name: ${{ steps.calculateArtifactsNames.outputs.BuildOutputArtifactsName }} path: '${{ inputs.project }}/BuildOutput.txt' if-no-files-found: ignore @@ -208,7 +207,7 @@ jobs: uses: actions/upload-artifact@v3 if: (failure()) && (hashFiles(format('{0}/ContainerEventLog.evtx',inputs.project)) != '') with: - name: ${{ env.ContainerEventLogArtifactsName }} + name: ${{ steps.calculateArtifactsNames.outputs.ContainerEventLogArtifactsName }} path: '${{ inputs.project }}/ContainerEventLog.evtx' if-no-files-found: ignore @@ -216,7 +215,7 @@ jobs: uses: actions/upload-artifact@v3 if: (success() || failure()) && (hashFiles(format('{0}/TestResults.xml',inputs.project)) != '') with: - name: ${{ env.TestResultsArtifactsName }} + name: ${{ steps.calculateArtifactsNames.outputs.TestResultsArtifactsName }} path: '${{ inputs.project }}/TestResults.xml' if-no-files-found: ignore @@ -224,23 +223,23 @@ jobs: uses: actions/upload-artifact@v3 if: (success() || failure()) && (hashFiles(format('{0}/bcptTestResults.json',inputs.project)) != '') with: - name: ${{ env.BcptTestResultsArtifactsName }} + name: ${{ steps.calculateArtifactsNames.outputs.BcptTestResultsArtifactsName }} path: '${{ inputs.project }}/bcptTestResults.json' if-no-files-found: ignore - name: Analyze Test Results id: analyzeTestResults if: success() || failure() - uses: microsoft/AL-Go-Actions/AnalyzeTests@preview + uses: microsoft/AL-Go/Actions/AnalyzeTests@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: ${{ inputs.shell }} parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} - Project: ${{ inputs.project }} + project: ${{ inputs.project }} - name: Cleanup if: always() - uses: microsoft/AL-Go-Actions/PipelineCleanup@preview + uses: microsoft/AL-Go/Actions/PipelineCleanup@d15c25e25c4b0033da9f99970e3a420e231f7fbc with: shell: ${{ inputs.shell }} parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} - Project: ${{ inputs.project }} + project: ${{ inputs.project }} diff --git a/System Application Modules/.AL-Go/cloudDevEnv.ps1 b/System Application Modules/.AL-Go/cloudDevEnv.ps1 index e84375c1e0..340861ed0d 100644 --- a/System Application Modules/.AL-Go/cloudDevEnv.ps1 +++ b/System Application Modules/.AL-Go/cloudDevEnv.ps1 @@ -9,8 +9,7 @@ Param( [switch] $fromVSCode ) -$ErrorActionPreference = "stop" -Set-StrictMode -Version 2.0 +$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 try { $webClient = New-Object System.Net.WebClient @@ -18,10 +17,10 @@ $webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumen $webClient.Encoding = [System.Text.Encoding]::UTF8 Write-Host "Downloading GitHub Helper module" $GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/Github-Helper.psm1', $GitHubHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/Github-Helper.psm1', $GitHubHelperPath) Write-Host "Downloading AL-Go Helper script" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/AL-Go-Helper.ps1', $ALGoHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) Import-Module $GitHubHelperPath . $ALGoHelperPath -local diff --git a/System Application Modules/.AL-Go/localDevEnv.ps1 b/System Application Modules/.AL-Go/localDevEnv.ps1 index 1d1386e6ae..9d1f83b3c2 100644 --- a/System Application Modules/.AL-Go/localDevEnv.ps1 +++ b/System Application Modules/.AL-Go/localDevEnv.ps1 @@ -12,8 +12,7 @@ Param( [switch] $fromVSCode ) -$ErrorActionPreference = "stop" -Set-StrictMode -Version 2.0 +$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 try { $webClient = New-Object System.Net.WebClient @@ -21,10 +20,10 @@ $webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumen $webClient.Encoding = [System.Text.Encoding]::UTF8 Write-Host "Downloading GitHub Helper module" $GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/Github-Helper.psm1', $GitHubHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/Github-Helper.psm1', $GitHubHelperPath) Write-Host "Downloading AL-Go Helper script" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/AL-Go-Helper.ps1', $ALGoHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) Import-Module $GitHubHelperPath . $ALGoHelperPath -local diff --git a/System Application/.AL-Go/cloudDevEnv.ps1 b/System Application/.AL-Go/cloudDevEnv.ps1 index e84375c1e0..340861ed0d 100644 --- a/System Application/.AL-Go/cloudDevEnv.ps1 +++ b/System Application/.AL-Go/cloudDevEnv.ps1 @@ -9,8 +9,7 @@ Param( [switch] $fromVSCode ) -$ErrorActionPreference = "stop" -Set-StrictMode -Version 2.0 +$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 try { $webClient = New-Object System.Net.WebClient @@ -18,10 +17,10 @@ $webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumen $webClient.Encoding = [System.Text.Encoding]::UTF8 Write-Host "Downloading GitHub Helper module" $GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/Github-Helper.psm1', $GitHubHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/Github-Helper.psm1', $GitHubHelperPath) Write-Host "Downloading AL-Go Helper script" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/AL-Go-Helper.ps1', $ALGoHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) Import-Module $GitHubHelperPath . $ALGoHelperPath -local diff --git a/System Application/.AL-Go/localDevEnv.ps1 b/System Application/.AL-Go/localDevEnv.ps1 index 1d1386e6ae..9d1f83b3c2 100644 --- a/System Application/.AL-Go/localDevEnv.ps1 +++ b/System Application/.AL-Go/localDevEnv.ps1 @@ -12,8 +12,7 @@ Param( [switch] $fromVSCode ) -$ErrorActionPreference = "stop" -Set-StrictMode -Version 2.0 +$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 try { $webClient = New-Object System.Net.WebClient @@ -21,10 +20,10 @@ $webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumen $webClient.Encoding = [System.Text.Encoding]::UTF8 Write-Host "Downloading GitHub Helper module" $GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/Github-Helper.psm1', $GitHubHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/Github-Helper.psm1', $GitHubHelperPath) Write-Host "Downloading AL-Go Helper script" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/AL-Go-Helper.ps1', $ALGoHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) Import-Module $GitHubHelperPath . $ALGoHelperPath -local diff --git a/Test Framework/.AL-Go/cloudDevEnv.ps1 b/Test Framework/.AL-Go/cloudDevEnv.ps1 index e84375c1e0..340861ed0d 100644 --- a/Test Framework/.AL-Go/cloudDevEnv.ps1 +++ b/Test Framework/.AL-Go/cloudDevEnv.ps1 @@ -9,8 +9,7 @@ Param( [switch] $fromVSCode ) -$ErrorActionPreference = "stop" -Set-StrictMode -Version 2.0 +$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 try { $webClient = New-Object System.Net.WebClient @@ -18,10 +17,10 @@ $webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumen $webClient.Encoding = [System.Text.Encoding]::UTF8 Write-Host "Downloading GitHub Helper module" $GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/Github-Helper.psm1', $GitHubHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/Github-Helper.psm1', $GitHubHelperPath) Write-Host "Downloading AL-Go Helper script" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/AL-Go-Helper.ps1', $ALGoHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) Import-Module $GitHubHelperPath . $ALGoHelperPath -local diff --git a/Test Framework/.AL-Go/localDevEnv.ps1 b/Test Framework/.AL-Go/localDevEnv.ps1 index 1d1386e6ae..9d1f83b3c2 100644 --- a/Test Framework/.AL-Go/localDevEnv.ps1 +++ b/Test Framework/.AL-Go/localDevEnv.ps1 @@ -12,8 +12,7 @@ Param( [switch] $fromVSCode ) -$ErrorActionPreference = "stop" -Set-StrictMode -Version 2.0 +$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 try { $webClient = New-Object System.Net.WebClient @@ -21,10 +20,10 @@ $webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumen $webClient.Encoding = [System.Text.Encoding]::UTF8 Write-Host "Downloading GitHub Helper module" $GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/Github-Helper.psm1', $GitHubHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/Github-Helper.psm1', $GitHubHelperPath) Write-Host "Downloading AL-Go Helper script" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/AL-Go-Helper.ps1', $ALGoHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) Import-Module $GitHubHelperPath . $ALGoHelperPath -local diff --git a/Test Stability Tools/.AL-Go/cloudDevEnv.ps1 b/Test Stability Tools/.AL-Go/cloudDevEnv.ps1 index e84375c1e0..340861ed0d 100644 --- a/Test Stability Tools/.AL-Go/cloudDevEnv.ps1 +++ b/Test Stability Tools/.AL-Go/cloudDevEnv.ps1 @@ -9,8 +9,7 @@ Param( [switch] $fromVSCode ) -$ErrorActionPreference = "stop" -Set-StrictMode -Version 2.0 +$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 try { $webClient = New-Object System.Net.WebClient @@ -18,10 +17,10 @@ $webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumen $webClient.Encoding = [System.Text.Encoding]::UTF8 Write-Host "Downloading GitHub Helper module" $GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/Github-Helper.psm1', $GitHubHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/Github-Helper.psm1', $GitHubHelperPath) Write-Host "Downloading AL-Go Helper script" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/AL-Go-Helper.ps1', $ALGoHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) Import-Module $GitHubHelperPath . $ALGoHelperPath -local diff --git a/Test Stability Tools/.AL-Go/localDevEnv.ps1 b/Test Stability Tools/.AL-Go/localDevEnv.ps1 index 1d1386e6ae..9d1f83b3c2 100644 --- a/Test Stability Tools/.AL-Go/localDevEnv.ps1 +++ b/Test Stability Tools/.AL-Go/localDevEnv.ps1 @@ -12,8 +12,7 @@ Param( [switch] $fromVSCode ) -$ErrorActionPreference = "stop" -Set-StrictMode -Version 2.0 +$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 try { $webClient = New-Object System.Net.WebClient @@ -21,10 +20,10 @@ $webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumen $webClient.Encoding = [System.Text.Encoding]::UTF8 Write-Host "Downloading GitHub Helper module" $GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/Github-Helper.psm1', $GitHubHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/Github-Helper.psm1', $GitHubHelperPath) Write-Host "Downloading AL-Go Helper script" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" -$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/preview/AL-Go-Helper.ps1', $ALGoHelperPath) +$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/d15c25e25c4b0033da9f99970e3a420e231f7fbc/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) Import-Module $GitHubHelperPath . $ALGoHelperPath -local