diff --git a/.github/AL-Go-Settings.json b/.github/AL-Go-Settings.json index 667cbffc6b..be989e6d91 100644 --- a/.github/AL-Go-Settings.json +++ b/.github/AL-Go-Settings.json @@ -5,7 +5,7 @@ "runs-on": "windows-latest", "cacheImageName": "", "UsePsSession": false, - "artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/25.0.20074.0/base", + "artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/25.0.23364.27649/base", "country": "base", "useProjectDependencies": true, "repoVersion": "25.0", @@ -58,5 +58,5 @@ ], "UpdateALGoSystemFilesEnvironment": "Official-Build", "PullRequestTrigger": "pull_request", - "templateSha": "0476547896ebcd3ba5455b3e0e59b48c0d4a26ca" + "templateSha": "affc76e00812eaa4656997452d2f141c482cf3cc" } diff --git a/.github/workflows/CICD.yaml b/.github/workflows/CICD.yaml index bfa1b2868c..0026a6f920 100644 --- a/.github/workflows/CICD.yaml +++ b/.github/workflows/CICD.yaml @@ -14,8 +14,10 @@ defaults: shell: powershell permissions: - contents: read actions: read + contents: read + id-token: write + pages: read env: workflowDepth: 2 @@ -39,31 +41,48 @@ jobs: projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} + powerPlatformSolutionFolder: ${{ steps.DeterminePowerPlatformSolutionFolder.outputs.powerPlatformSolutionFolder }} workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: lfs: true - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/WorkflowInitialize@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell - eventId: "DO0091" - name: Read settings id: ReadSettings - uses: microsoft/AL-Go/Actions/ReadSettings@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/ReadSettings@006019b87cab11f6234d05f2c34372daf3c7075d + with: + shell: powershell + get: type,powerPlatformSolutionFolder,useGitSubmodules + + - name: Read submodules token + id: ReadSubmodulesToken + if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' + uses: microsoft/AL-Go/Actions/ReadSecrets@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell - get: type + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: '-gitSubmodulesToken' + + - name: Checkout Submodules + if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + lfs: true + submodules: ${{ env.useGitSubmodules }} + token: '${{ fromJson(steps.ReadSubmodulesToken.outputs.Secrets).gitSubmodulesToken }}' - name: Determine Workflow Depth id: DetermineWorkflowDepth @@ -72,14 +91,20 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell maxBuildDepth: ${{ env.workflowDepth }} + - name: Determine PowerPlatform Solution Folder + id: DeterminePowerPlatformSolutionFolder + if: env.type == 'PTE' + run: | + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "powerPlatformSolutionFolder=$($env:powerPlatformSolutionFolder)" + - name: Determine Delivery Target Secrets id: DetermineDeliveryTargetSecrets - uses: microsoft/AL-Go/Actions/DetermineDeliveryTargets@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/DetermineDeliveryTargets@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell projectsJson: '${{ steps.determineProjectsToBuild.outputs.ProjectsJson }}' @@ -87,7 +112,7 @@ jobs: - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/ReadSecrets@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -95,7 +120,7 @@ jobs: - name: Determine Delivery Targets id: DetermineDeliveryTargets - uses: microsoft/AL-Go/Actions/DetermineDeliveryTargets@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/DetermineDeliveryTargets@006019b87cab11f6234d05f2c34372daf3c7075d env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -105,7 +130,7 @@ jobs: - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@006019b87cab11f6234d05f2c34372daf3c7075d env: GITHUB_TOKEN: ${{ github.token }} with: @@ -118,16 +143,16 @@ jobs: runs-on: [ windows-latest ] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/ReadSettings@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell get: templateUrl - name: Check for updates to AL-Go system files - uses: microsoft/AL-Go/Actions/CheckForUpdates@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/CheckForUpdates@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell templateUrl: ${{ env.templateUrl }} @@ -144,9 +169,8 @@ jobs: uses: ./.github/workflows/_BuildALGoProject.yaml secrets: inherit with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - runsOn: ${{ needs.Initialization.outputs.githubRunner }} - parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} + shell: ${{ matrix.githubRunnerShell }} + runsOn: ${{ matrix.githubRunner }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} @@ -168,9 +192,8 @@ jobs: uses: ./.github/workflows/_BuildALGoProject.yaml secrets: inherit with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - runsOn: ${{ needs.Initialization.outputs.githubRunner }} - parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} + shell: ${{ matrix.githubRunnerShell }} + runsOn: ${{ matrix.githubRunner }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} @@ -181,13 +204,27 @@ jobs: signArtifacts: true useArtifactCache: true + BuildPP: + needs: [ Initialization ] + if: (!failure()) && (!cancelled()) && needs.Initialization.outputs.powerPlatformSolutionFolder != '' + name: Build PowerPlatform Solution + uses: ./.github/workflows/_BuildPowerPlatformSolution.yaml + secrets: inherit + with: + shell: ${{ needs.Initialization.outputs.githubRunnerShell }} + runsOn: ${{ needs.Initialization.outputs.githubRunner }} + parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} + project: ${{ needs.Initialization.outputs.powerPlatformSolutionFolder }} + projectName: ${{ needs.Initialization.outputs.powerPlatformSolutionFolder }} + publishArtifacts: ${{ github.ref_name == 'main' || startswith(github.ref_name, 'release/') || startswith(github.ref_name, 'releases/') || needs.Initialization.outputs.deliveryTargetsJson != '[]' || needs.Initialization.outputs.environmentCount > 0 }} + DeployALDoc: needs: [ Initialization, Build ] - if: always() && needs.Build.result == 'Success' && needs.Initialization.outputs.generateALDocArtifact == 1 && github.ref_name == 'main' - runs-on: windows-latest + if: (!cancelled()) && needs.Build.result == 'Success' && needs.Initialization.outputs.generateALDocArtifact == 1 && github.ref_name == 'main' + runs-on: [ windows-latest ] name: Deploy Reference Documentation permissions: - contents: write + contents: read actions: read pages: write id-token: write @@ -196,60 +233,64 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Download artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/ReadSettings@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell - name: Setup Pages if: needs.Initialization.outputs.deployALDocArtifact == 1 - uses: actions/configure-pages@v4 + uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 - name: Build Reference Documentation - uses: microsoft/AL-Go/Actions/BuildReferenceDocumentation@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/BuildReferenceDocumentation@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell artifacts: '.artifacts' - name: Upload pages artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 with: path: ".aldoc/_site/" - name: Deploy to GitHub Pages if: needs.Initialization.outputs.deployALDocArtifact == 1 id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 Deploy: - needs: [ Initialization, Build ] - if: always() && needs.Build.result == 'Success' && needs.Initialization.outputs.environmentCount > 0 + needs: [ Initialization, Build, BuildPP ] + if: (!cancelled()) && (needs.Build.result == 'success' || needs.Build.result == 'skipped') && (needs.BuildPP.result == 'success' || needs.BuildPP.result == 'skipped') && needs.Initialization.outputs.environmentCount > 0 strategy: ${{ fromJson(needs.Initialization.outputs.environmentsMatrixJson) }} runs-on: ${{ fromJson(matrix.os) }} name: Deploy to ${{ matrix.environment }} + defaults: + run: + shell: ${{ matrix.shell }} environment: name: ${{ matrix.environment }} url: ${{ steps.Deploy.outputs.environmentUrl }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Download artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/ReadSettings@006019b87cab11f6234d05f2c34372daf3c7075d with: - shell: powershell + shell: ${{ matrix.shell }} + get: type,powerPlatformSolutionFolder - name: EnvName id: envName @@ -260,27 +301,38 @@ jobs: - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/ReadSecrets@006019b87cab11f6234d05f2c34372daf3c7075d with: - shell: powershell + shell: ${{ matrix.shell }} 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' + getSecrets: '${{ steps.envName.outputs.envName }}-AuthContext,${{ steps.envName.outputs.envName }}_AuthContext,AuthContext' - - name: Deploy + - name: Deploy to Business Central id: Deploy - uses: microsoft/AL-Go/Actions/Deploy@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/Deploy@006019b87cab11f6234d05f2c34372daf3c7075d env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: - shell: powershell + shell: ${{ matrix.shell }} environmentName: ${{ matrix.environment }} - artifacts: '.artifacts' + artifactsFolder: '.artifacts' type: 'CD' deploymentEnvironmentsJson: ${{ needs.Initialization.outputs.deploymentEnvironmentsJson }} + - name: Deploy to Power Platform + if: env.type == 'PTE' && env.powerPlatformSolutionFolder != '' + uses: microsoft/AL-Go/Actions/DeployPowerPlatform@006019b87cab11f6234d05f2c34372daf3c7075d + env: + Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' + with: + shell: powershell + environmentName: ${{ matrix.environment }} + artifactsFolder: '.artifacts' + deploymentEnvironmentsJson: ${{ needs.Initialization.outputs.deploymentEnvironmentsJson }} + Deliver: - needs: [ Initialization, Build ] - if: always() && needs.Build.result == 'Success' && needs.Initialization.outputs.deliveryTargetsJson != '[]' + needs: [ Initialization, Build, BuildPP ] + if: (!cancelled()) && (needs.Build.result == 'success' || needs.Build.result == 'skipped') && (needs.BuildPP.result == 'success' || needs.BuildPP.result == 'skipped') && needs.Initialization.outputs.deliveryTargetsJson != '[]' strategy: matrix: deliveryTarget: ${{ fromJson(needs.Initialization.outputs.deliveryTargetsJson) }} @@ -289,28 +341,28 @@ jobs: name: Deliver to ${{ matrix.deliveryTarget }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Download artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/ReadSettings@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/ReadSecrets@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} getSecrets: '${{ matrix.deliveryTarget }}Context' - name: Deliver - uses: microsoft/AL-Go/Actions/Deliver@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/Deliver@006019b87cab11f6234d05f2c34372daf3c7075d env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -321,17 +373,19 @@ jobs: artifacts: '.artifacts' PostProcess: - needs: [ Initialization, Build, Deploy, Deliver, DeployALDoc ] + needs: [ Initialization, Build, BuildPP, Deploy, Deliver, DeployALDoc ] if: (!cancelled()) runs-on: [ windows-latest ] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go/Actions/WorkflowPostProcess@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@006019b87cab11f6234d05f2c34372daf3c7075d + env: + GITHUB_TOKEN: ${{ github.token }} with: shell: powershell - eventId: "DO0091" telemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} + currentJobContext: ${{ toJson(job) }} diff --git a/.github/workflows/DeployReferenceDocumentation.yaml b/.github/workflows/DeployReferenceDocumentation.yaml index 90e471b173..0c84ecfa14 100644 --- a/.github/workflows/DeployReferenceDocumentation.yaml +++ b/.github/workflows/DeployReferenceDocumentation.yaml @@ -4,10 +4,10 @@ on: workflow_dispatch: permissions: - contents: write actions: read - pages: write + contents: read id-token: write + pages: write defaults: run: @@ -26,46 +26,55 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/WorkflowInitialize@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell - eventId: "DO0097" - + - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/ReadSettings@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@006019b87cab11f6234d05f2c34372daf3c7075d env: GITHUB_TOKEN: ${{ github.token }} with: shell: powershell getEnvironments: 'github-pages' type: 'Publish' - + - name: Setup Pages if: steps.DetermineDeploymentEnvironments.outputs.deployALDocArtifact == 1 - uses: actions/configure-pages@v4 - + uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 + - name: Build Reference Documentation - uses: microsoft/AL-Go/Actions/BuildReferenceDocumentation@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/BuildReferenceDocumentation@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell artifacts: 'latest' - + - name: Upload pages artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 with: path: ".aldoc/_site/" - + - name: Deploy to GitHub Pages if: steps.DetermineDeploymentEnvironments.outputs.deployALDocArtifact == 1 id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 + + - name: Finalize the workflow + if: always() + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@006019b87cab11f6234d05f2c34372daf3c7075d + env: + GITHUB_TOKEN: ${{ github.token }} + with: + shell: powershell + telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} + currentJobContext: ${{ toJson(job) }} diff --git a/.github/workflows/PullPowerPlatformChanges.yaml b/.github/workflows/PullPowerPlatformChanges.yaml new file mode 100644 index 0000000000..fe1e045730 --- /dev/null +++ b/.github/workflows/PullPowerPlatformChanges.yaml @@ -0,0 +1,111 @@ +name: ' Pull Power Platform changes' + +on: + workflow_dispatch: + inputs: + environment: + description: Environment to pull changes from + required: true + solutionFolder: + description: Folder name of the Power Platform solution (leave empty to use AL-Go setting) + required: false + directCommit: + description: Direct Commit? + type: boolean + default: false + useGhTokenWorkflow: + description: Use GhTokenWorkflow for PR/Commit? + type: boolean + default: false + +permissions: + actions: read + contents: write + id-token: write + pull-requests: write + +defaults: + run: + shell: powershell + +jobs: + PullChanges: + runs-on: [windows-latest] + name: Pull changes from ${{ inputs.environment }} + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Initialize the workflow + id: init + uses: microsoft/AL-Go/Actions/WorkflowInitialize@006019b87cab11f6234d05f2c34372daf3c7075d + with: + shell: powershell + + - name: EnvName + env: + _environment: ${{ inputs.environment }} + run: | + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 + $envName = "$env:_environment".Split(' ')[0] + Add-Content -encoding utf8 -Path $env:GITHUB_ENV -Value "envName=$envName" + + - name: Read settings + uses: microsoft/AL-Go/Actions/ReadSettings@006019b87cab11f6234d05f2c34372daf3c7075d + with: + shell: powershell + get: powerPlatformSolutionFolder + + - name: Read secrets + id: ReadSecrets + uses: microsoft/AL-Go/Actions/ReadSecrets@006019b87cab11f6234d05f2c34372daf3c7075d + with: + shell: powershell + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: '${{ env.envName }}-AuthContext,${{ env.envName }}_AuthContext,AuthContext,TokenForPush' + useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' + + - name: Determine Deployment Environments + id: DetermineDeploymentEnvironments + uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@006019b87cab11f6234d05f2c34372daf3c7075d + env: + GITHUB_TOKEN: ${{ github.token }} + with: + shell: powershell + getEnvironments: ${{ inputs.environment }} + type: 'All' + + - name: Set Power Platform solution folder + env: + _solutionFolder: ${{ inputs.solutionFolder }} + run: | + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 + $solutionFolder = $env:_solutionFolder + if ($solutionFolder -eq '') { + Write-Host "Solution folder is not provided. Taking the folder from AL-Go settings" + $solutionFolder = $env:powerPlatformSolutionFolder + } + Write-Host "Solution folder: $solutionFolder" + Add-Content -encoding utf8 -Path $env:GITHUB_ENV -Value "solutionFolder=$solutionFolder" + + - name: Pull changes from Power Platform environment + uses: microsoft/AL-Go/Actions/PullPowerPlatformChanges@006019b87cab11f6234d05f2c34372daf3c7075d + env: + Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' + with: + shell: powershell + token: ${{ steps.ReadSecrets.outputs.TokenForPush }} + directCommit: ${{ inputs.directCommit }} + environmentName: ${{ inputs.environment }} + solutionFolder: ${{ env.solutionFolder }} + deploymentEnvironmentsJson: ${{ steps.DetermineDeploymentEnvironments.outputs.deploymentEnvironmentsJson }} + + - name: Finalize the workflow + if: always() + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@006019b87cab11f6234d05f2c34372daf3c7075d + env: + GITHUB_TOKEN: ${{ github.token }} + with: + shell: powershell + telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} + currentJobContext: ${{ toJson(job) }} diff --git a/.github/workflows/PullRequestHandler.yaml b/.github/workflows/PullRequestHandler.yaml index 0b377c6d2f..3bb181d9a7 100644 --- a/.github/workflows/PullRequestHandler.yaml +++ b/.github/workflows/PullRequestHandler.yaml @@ -13,8 +13,9 @@ defaults: shell: powershell permissions: - contents: read actions: read + contents: read + id-token: write pull-requests: read env: @@ -25,45 +26,42 @@ env: jobs: PregateCheck: 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 ] + runs-on: windows-latest steps: - - uses: microsoft/AL-Go/Actions/VerifyPRChanges@4c5bfbca1adebbf997f63882df4b9074a19aac1d + - uses: microsoft/AL-Go/Actions/VerifyPRChanges@006019b87cab11f6234d05f2c34372daf3c7075d Initialization: needs: [ PregateCheck ] if: (!failure() && !cancelled()) runs-on: [ windows-latest ] outputs: - telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} - githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} - githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} baselineWorkflowRunId: ${{ steps.determineProjectsToBuild.outputs.BaselineWorkflowRunId }} workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} + telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: lfs: true - ref: refs/pull/${{ github.event.number }}/merge + ref: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/{0}/merge', github.event.pull_request.number) }} - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/WorkflowInitialize@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell - eventId: "DO0104" - name: Read settings id: ReadSettings - uses: microsoft/AL-Go/Actions/ReadSettings@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/ReadSettings@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell @@ -74,7 +72,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell maxBuildDepth: ${{ env.workflowDepth }} @@ -90,10 +88,9 @@ jobs: uses: ./.github/workflows/_BuildALGoProject.yaml secrets: inherit with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - runsOn: ${{ needs.Initialization.outputs.githubRunner }} - checkoutRef: refs/pull/${{ github.event.number }}/merge - parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} + shell: ${{ matrix.githubRunnerShell }} + runsOn: ${{ matrix.githubRunner }} + checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/{0}/merge', github.event.pull_request.number) }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} @@ -114,10 +111,9 @@ jobs: uses: ./.github/workflows/_BuildALGoProject.yaml secrets: inherit with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - runsOn: ${{ needs.Initialization.outputs.githubRunner }} - checkoutRef: refs/pull/${{ github.event.number }}/merge - parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} + shell: ${{ matrix.githubRunnerShell }} + runsOn: ${{ matrix.githubRunner }} + checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/{0}/merge', github.event.pull_request.number) }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} @@ -135,8 +131,19 @@ jobs: steps: - name: Pull Request Status Check id: PullRequestStatusCheck - uses: microsoft/AL-Go/Actions/PullRequestStatusCheck@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/PullRequestStatusCheck@006019b87cab11f6234d05f2c34372daf3c7075d + env: + GITHUB_TOKEN: ${{ github.token }} + with: + shell: powershell + + - name: Finalize the workflow + id: PostProcess + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@006019b87cab11f6234d05f2c34372daf3c7075d + if: success() || failure() env: GITHUB_TOKEN: ${{ github.token }} with: shell: powershell + telemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} + currentJobContext: ${{ toJson(job) }} diff --git a/.github/workflows/PushPowerPlatformChanges.yaml b/.github/workflows/PushPowerPlatformChanges.yaml new file mode 100644 index 0000000000..03fb17aadd --- /dev/null +++ b/.github/workflows/PushPowerPlatformChanges.yaml @@ -0,0 +1,100 @@ +name: " Push Power Platform changes" + +on: + workflow_dispatch: + inputs: + environment: + description: Environment to push changes to + required: true + solutionFolder: + description: Folder name of the Power Platform solution (leave empty to use AL-Go setting) + required: false + +permissions: + actions: read + contents: read + id-token: write + +defaults: + run: + shell: powershell + +jobs: + PushChanges: + runs-on: [windows-latest] + name: Push changes to ${{ inputs.environment }} + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Initialize the workflow + id: init + uses: microsoft/AL-Go/Actions/WorkflowInitialize@006019b87cab11f6234d05f2c34372daf3c7075d + with: + shell: powershell + + - name: EnvName + env: + _environment: ${{ inputs.environment }} + run: | + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 + # Environment names can contains spaces and tags (like (PROD) etc. We need to remove them to get the correct environment name) + $envName = "$env:_environment".Split(' ')[0] + Add-Content -encoding utf8 -Path $env:GITHUB_ENV -Value "envName=$envName" + + - name: Read settings + uses: microsoft/AL-Go/Actions/ReadSettings@006019b87cab11f6234d05f2c34372daf3c7075d + with: + shell: powershell + get: powerPlatformSolutionFolder + + - name: Read secrets + id: ReadSecrets + uses: microsoft/AL-Go/Actions/ReadSecrets@006019b87cab11f6234d05f2c34372daf3c7075d + with: + shell: powershell + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: '${{ env.envName }}-AuthContext,${{ env.envName }}_AuthContext,AuthContext' + + - name: Determine Deployment Environments + id: DetermineDeploymentEnvironments + uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@006019b87cab11f6234d05f2c34372daf3c7075d + env: + GITHUB_TOKEN: ${{ github.token }} + with: + shell: powershell + getEnvironments: ${{ inputs.environment }} + type: 'All' + + - name: Set Power Platform solution folder + env: + _solutionFolder: ${{ inputs.solutionFolder }} + run: | + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 + $solutionFolder = $env:_solutionFolder + if ($solutionFolder -eq '') { + Write-Host "Solution folder is not provided. Taking the folder from AL-Go settings" + $solutionFolder = $env:powerPlatformSolutionFolder + } + Write-Host "Solution folder: $solutionFolder" + Add-Content -encoding utf8 -Path $env:GITHUB_ENV -Value "solutionFolder=$solutionFolder" + + - name: Export and push changes to Power Platform + uses: microsoft/AL-Go/Actions/DeployPowerPlatform@006019b87cab11f6234d05f2c34372daf3c7075d + env: + Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' + with: + shell: powershell + environmentName: ${{ inputs.environment }} + solutionFolder: ${{ env.solutionFolder }} + deploymentEnvironmentsJson: ${{ steps.DetermineDeploymentEnvironments.outputs.deploymentEnvironmentsJson }} + + - name: Finalize the workflow + if: always() + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@006019b87cab11f6234d05f2c34372daf3c7075d + env: + GITHUB_TOKEN: ${{ github.token }} + with: + shell: powershell + telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} + currentJobContext: ${{ toJson(job) }} diff --git a/.github/workflows/Troubleshooting.yaml b/.github/workflows/Troubleshooting.yaml index ca8f8f5f20..ba869d72e7 100644 --- a/.github/workflows/Troubleshooting.yaml +++ b/.github/workflows/Troubleshooting.yaml @@ -9,8 +9,8 @@ on: default: false permissions: - contents: read actions: read + contents: read defaults: run: @@ -25,12 +25,12 @@ jobs: runs-on: [ windows-latest ] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: lfs: true - name: Troubleshooting - uses: microsoft/AL-Go/Actions/Troubleshooting@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/Troubleshooting@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} diff --git a/.github/workflows/UpdateGitHubGoSystemFiles.yaml b/.github/workflows/UpdateGitHubGoSystemFiles.yaml index aad5acc4c4..ebf44387b7 100644 --- a/.github/workflows/UpdateGitHubGoSystemFiles.yaml +++ b/.github/workflows/UpdateGitHubGoSystemFiles.yaml @@ -17,7 +17,9 @@ on: default: false permissions: + actions: read contents: read + id-token: write defaults: run: @@ -29,34 +31,34 @@ env: jobs: UpdateALGoSystemFiles: - needs: [ ] + name: 'Update AL-Go System Files' environment: Official-Build + needs: [ ] runs-on: [ windows-latest ] steps: - name: Dump Workflow Information - uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/WorkflowInitialize@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell - eventId: "DO0098" - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/ReadSettings@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell get: templateUrl - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/ReadSecrets@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -92,7 +94,7 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "downloadLatest=$downloadLatest" - name: Update AL-Go system files - uses: microsoft/AL-Go/Actions/CheckForUpdates@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/CheckForUpdates@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: powershell token: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).ghTokenWorkflow }} @@ -103,8 +105,10 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go/Actions/WorkflowPostProcess@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@006019b87cab11f6234d05f2c34372daf3c7075d + env: + GITHUB_TOKEN: ${{ github.token }} with: shell: powershell - eventId: "DO0098" telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} + currentJobContext: ${{ toJson(job) }} diff --git a/.github/workflows/_BuildALGoProject.yaml b/.github/workflows/_BuildALGoProject.yaml index ebb7055193..40b4e2a525 100644 --- a/.github/workflows/_BuildALGoProject.yaml +++ b/.github/workflows/_BuildALGoProject.yaml @@ -1,6 +1,6 @@ -name: '_Build AL-GO project' +name: '_Build AL-Go project' -run-name: 'Build project ${{ inputs.project }}' +run-name: 'Build ${{ inputs.project }}' on: workflow_call: @@ -11,13 +11,13 @@ on: default: powershell type: string runsOn: - description: JSON-formatted string og the types of machine to run the build job on + description: JSON-formatted string of the types of machine to run the build job on required: true type: string checkoutRef: description: Ref to checkout required: false - default: ${{ github.ref }} + default: ${{ github.sha }} type: string project: description: Name of the built project @@ -67,10 +67,11 @@ on: description: Flag determining whether to use the Artifacts Cache type: boolean default: false - parentTelemetryScopeJson: - description: Specifies the telemetry scope for the telemetry signal - required: false - type: string + +permissions: + actions: read + contents: read + id-token: write env: ALGoOrgSettings: ${{ vars.ALGoOrgSettings }} @@ -86,45 +87,53 @@ jobs: name: ${{ inputs.projectName }} (${{ inputs.buildMode }}) steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ inputs.checkoutRef }} lfs: true - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/ReadSettings@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} - get: useCompilerFolder,keyVaultCodesignCertificateName,doNotSignApps,doNotRunTests,artifact,generateDependencyArtifact + get: useCompilerFolder,keyVaultCodesignCertificateName,doNotSignApps,doNotRunTests,artifact,generateDependencyArtifact,trustedSigning,useGitSubmodules - name: Read secrets id: ReadSecrets if: github.event_name != 'pull_request' - uses: microsoft/AL-Go/Actions/ReadSecrets@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/ReadSecrets@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: ${{ inputs.shell }} gitHubSecrets: ${{ toJson(secrets) }} - getSecrets: '${{ inputs.secrets }},appDependencyProbingPathsSecrets' + getSecrets: '${{ inputs.secrets }},appDependencySecrets,AZURE_CREDENTIALS,-gitSubmodulesToken' + + - name: Checkout Submodules + if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + ref: ${{ inputs.checkoutRef }} + lfs: true + submodules: ${{ env.useGitSubmodules }} + token: '${{ fromJson(steps.ReadSecrets.outputs.Secrets).gitSubmodulesToken }}' - name: Determine ArtifactUrl - uses: microsoft/AL-Go/Actions/DetermineArtifactUrl@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/DetermineArtifactUrl@006019b87cab11f6234d05f2c34372daf3c7075d id: determineArtifactUrl with: shell: ${{ inputs.shell }} - parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} project: ${{ inputs.project }} - name: Cache Business Central Artifacts if: env.useCompilerFolder == 'True' && inputs.useArtifactCache && env.artifactCacheKey - uses: actions/cache@v4 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: path: .artifactcache key: ${{ env.artifactCacheKey }} - name: Download Project Dependencies id: DownloadProjectDependencies - uses: microsoft/AL-Go/Actions/DownloadProjectDependencies@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/DownloadProjectDependencies@006019b87cab11f6234d05f2c34372daf3c7075d env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -135,13 +144,12 @@ jobs: baselineWorkflowRunId: ${{ inputs.baselineWorkflowRunId }} - name: Build - uses: microsoft/AL-Go/Actions/RunPipeline@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/RunPipeline@006019b87cab11f6234d05f2c34372daf3c7075d env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' BuildMode: ${{ inputs.buildMode }} with: shell: ${{ inputs.shell }} - parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} artifact: ${{ env.artifact }} project: ${{ inputs.project }} buildMode: ${{ inputs.buildMode }} @@ -149,18 +157,17 @@ jobs: installTestAppsJson: ${{ steps.DownloadProjectDependencies.outputs.DownloadedTestApps }} - name: Sign - if: inputs.signArtifacts && env.doNotSignApps == 'False' && env.keyVaultCodesignCertificateName != '' + if: inputs.signArtifacts && env.doNotSignApps == 'False' && (env.keyVaultCodesignCertificateName != '' || (fromJson(env.trustedSigning).Endpoint != '' && fromJson(env.trustedSigning).Account != '' && fromJson(env.trustedSigning).CertificateProfile != '')) id: sign - uses: microsoft/AL-Go/Actions/Sign@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/Sign@006019b87cab11f6234d05f2c34372daf3c7075d with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - azureCredentialsJson: ${{ secrets.AZURE_CREDENTIALS }} + shell: ${{ inputs.shell }} + azureCredentialsJson: '${{ fromJson(steps.ReadSecrets.outputs.Secrets).AZURE_CREDENTIALS }}' pathToFiles: '${{ inputs.project }}/.buildartifacts/Apps/*.app' - parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} - name: Calculate Artifact names id: calculateArtifactsNames - uses: microsoft/AL-Go/Actions/CalculateArtifactNames@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/CalculateArtifactNames@006019b87cab11f6234d05f2c34372daf3c7075d if: success() || failure() with: shell: ${{ inputs.shell }} @@ -170,7 +177,7 @@ jobs: - name: Upload thisbuild artifacts - apps if: inputs.publishThisBuildArtifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: ${{ steps.calculateArtifactsNames.outputs.ThisBuildAppsArtifactsName }} path: '${{ inputs.project }}/.buildartifacts/Apps/' @@ -179,7 +186,7 @@ jobs: - name: Upload thisbuild artifacts - dependencies if: inputs.publishThisBuildArtifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: ${{ steps.calculateArtifactsNames.outputs.ThisBuildDependenciesArtifactsName }} path: '${{ inputs.project }}/.buildartifacts/Dependencies/' @@ -188,7 +195,7 @@ jobs: - name: Upload thisbuild artifacts - test apps if: inputs.publishThisBuildArtifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: ${{ steps.calculateArtifactsNames.outputs.ThisBuildTestAppsArtifactsName }} path: '${{ inputs.project }}/.buildartifacts/TestApps/' @@ -196,7 +203,7 @@ jobs: retention-days: 1 - name: Publish artifacts - apps - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 if: inputs.publishArtifacts with: name: ${{ steps.calculateArtifactsNames.outputs.AppsArtifactsName }} @@ -204,7 +211,7 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - dependencies - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 if: inputs.publishArtifacts && env.generateDependencyArtifact == 'True' with: name: ${{ steps.calculateArtifactsNames.outputs.DependenciesArtifactsName }} @@ -212,7 +219,7 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - test apps - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 if: inputs.publishArtifacts with: name: ${{ steps.calculateArtifactsNames.outputs.TestAppsArtifactsName }} @@ -220,7 +227,7 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - build output - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 if: (success() || failure()) && (hashFiles(format('{0}/BuildOutput.txt',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.BuildOutputArtifactsName }} @@ -228,7 +235,7 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - container event log - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 if: (failure()) && (hashFiles(format('{0}/ContainerEventLog.evtx',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.ContainerEventLogArtifactsName }} @@ -236,34 +243,48 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - test results - uses: actions/upload-artifact@v4 - if: (success() || failure()) && (hashFiles(format('{0}/TestResults.xml',inputs.project)) != '') + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + if: (success() || failure()) && (hashFiles(format('{0}/.buildartifacts/TestResults.xml',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.TestResultsArtifactsName }} - path: '${{ inputs.project }}/TestResults.xml' + path: '${{ inputs.project }}/.buildartifacts/TestResults.xml' if-no-files-found: ignore - name: Publish artifacts - bcpt test results - uses: actions/upload-artifact@v4 - if: (success() || failure()) && (hashFiles(format('{0}/bcptTestResults.json',inputs.project)) != '') + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + if: (success() || failure()) && (hashFiles(format('{0}/.buildartifacts/bcptTestResults.json',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.BcptTestResultsArtifactsName }} - path: '${{ inputs.project }}/bcptTestResults.json' + path: '${{ inputs.project }}/.buildartifacts/bcptTestResults.json' + if-no-files-found: ignore + + - name: Publish artifacts - page scripting test results + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + if: (success() || failure()) && (hashFiles(format('{0}/.buildartifacts/PageScriptingTestResults.xml',inputs.project)) != '') + with: + name: ${{ steps.calculateArtifactsNames.outputs.PageScriptingTestResultsArtifactsName }} + path: '${{ inputs.project }}/.buildartifacts/PageScriptingTestResults.xml' + if-no-files-found: ignore + + - name: Publish artifacts - page scripting test result details + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + if: (success() || failure()) + with: + name: ${{ steps.calculateArtifactsNames.outputs.PageScriptingTestResultDetailsArtifactsName }} + path: '${{ inputs.project }}/.buildartifacts/PageScriptingTestResultDetails/' if-no-files-found: ignore - name: Analyze Test Results id: analyzeTestResults if: (success() || failure()) && env.doNotRunTests == 'False' - uses: microsoft/AL-Go/Actions/AnalyzeTests@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/AnalyzeTests@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: ${{ inputs.shell }} - parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} project: ${{ inputs.project }} - name: Cleanup if: always() - uses: microsoft/AL-Go/Actions/PipelineCleanup@4c5bfbca1adebbf997f63882df4b9074a19aac1d + uses: microsoft/AL-Go/Actions/PipelineCleanup@006019b87cab11f6234d05f2c34372daf3c7075d with: shell: ${{ inputs.shell }} - parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} project: ${{ inputs.project }} diff --git a/.github/workflows/_BuildPowerPlatformSolution.yaml b/.github/workflows/_BuildPowerPlatformSolution.yaml new file mode 100644 index 0000000000..a8113a718f --- /dev/null +++ b/.github/workflows/_BuildPowerPlatformSolution.yaml @@ -0,0 +1,96 @@ +name: '_Build PowerPlatform Solution' + +run-name: 'Build PowerPlatform Solution' + +on: + workflow_call: + inputs: + shell: + description: Shell in which you want to run the action (powershell or pwsh) + required: false + default: powershell + type: string + runsOn: + description: JSON-formatted string of the types of machine to run the build job on + required: true + type: string + checkoutRef: + description: Ref to checkout + required: false + default: ${{ github.sha }} + type: string + project: + description: Name of the built project + required: true + type: string + projectName: + description: Friendly name of the built project + required: true + type: string + publishArtifacts: + description: Flag indicating whether the artifacts should be published + type: boolean + default: false + artifactsNameSuffix: + description: Suffix to add to the artifacts names + required: false + default: '' + type: string + parentTelemetryScopeJson: + description: Specifies the telemetry scope for the telemetry signal + required: false + type: string + +env: + ALGoOrgSettings: ${{ vars.ALGoOrgSettings }} + ALGoRepoSettings: ${{ vars.ALGoRepoSettings }} + +jobs: + Build: + needs: [ ] + runs-on: ${{ fromJson(inputs.runsOn) }} + defaults: + run: + shell: ${{ inputs.shell }} + name: '${{ inputs.projectName }}' + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + ref: ${{ inputs.checkoutRef }} + lfs: true + + - name: Read settings + uses: microsoft/AL-Go/Actions/ReadSettings@006019b87cab11f6234d05f2c34372daf3c7075d + with: + shell: ${{ inputs.shell }} + project: ${{ inputs.project }} + get: type,powerPlatformSolutionFolder,appRevision,appBuild + + - name: Build + uses: microsoft/AL-Go/Actions/BuildPowerPlatform@006019b87cab11f6234d05f2c34372daf3c7075d + with: + shell: ${{ inputs.shell }} + solutionFolder: ${{ inputs.project }} + outputFolder: ${{ inputs.project }}/.buildartifacts/_PowerPlatformSolution/ + outputFileName: ${{ inputs.project }} + appRevision: ${{ env.appRevision }} + appBuild: ${{ env.appBuild }} + + - name: Calculate Artifact names + id: calculateArtifactsNames + uses: microsoft/AL-Go/Actions/CalculateArtifactNames@006019b87cab11f6234d05f2c34372daf3c7075d + if: success() || failure() + with: + shell: ${{ inputs.shell }} + project: ${{ inputs.project }} + buildMode: 'default' + suffix: ${{ inputs.artifactsNameSuffix }} + + - name: Publish artifacts - Power Platform Solution + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + if: inputs.publishArtifacts + with: + name: ${{ steps.calculateArtifactsNames.outputs.PowerPlatformSolutionArtifactsName }} + path: '${{ inputs.project }}/.buildartifacts/_PowerPlatformSolution/' + if-no-files-found: ignore diff --git a/Build/projects/1st Party Apps (W1)/.AL-Go/cloudDevEnv.ps1 b/Build/projects/1st Party Apps (W1)/.AL-Go/cloudDevEnv.ps1 index 38799b4107..90fd349744 100644 --- a/Build/projects/1st Party Apps (W1)/.AL-Go/cloudDevEnv.ps1 +++ b/Build/projects/1st Party Apps (W1)/.AL-Go/cloudDevEnv.ps1 @@ -6,11 +6,27 @@ Param( [string] $environmentName = "", [bool] $reuseExistingEnvironment, - [switch] $fromVSCode + [switch] $fromVSCode, + [switch] $clean ) $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 +function DownloadHelperFile { + param( + [string] $url, + [string] $folder + ) + + $prevProgressPreference = $ProgressPreference; $ProgressPreference = 'SilentlyContinue' + $name = [System.IO.Path]::GetFileName($url) + Write-Host "Downloading $name from $url" + $path = Join-Path $folder $name + Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path + $ProgressPreference = $prevProgressPreference + return $path +} + try { Clear-Host Write-Host @@ -24,17 +40,11 @@ Write-Host -ForegroundColor Yellow @' '@ -$webClient = New-Object System.Net.WebClient -$webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumentList ([System.Net.Cache.RequestCacheLevel]::NoCacheNoStore) -$webClient.Encoding = [System.Text.Encoding]::UTF8 -$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go/4c5bfbca1adebbf997f63882df4b9074a19aac1d/Actions/Github-Helper.psm1' -Write-Host "Downloading GitHub Helper module from $GitHubHelperUrl" -$GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1" -$webClient.DownloadFile($GitHubHelperUrl, $GitHubHelperPath) -$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go/4c5bfbca1adebbf997f63882df4b9074a19aac1d/Actions/AL-Go-Helper.ps1' -Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl" -$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" -$webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath) +$tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" +New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/006019b87cab11f6234d05f2c34372daf3c7075d/Actions/Github-Helper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/006019b87cab11f6234d05f2c34372daf3c7075d/Actions/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/006019b87cab11f6234d05f2c34372daf3c7075d/Actions/Packages.json' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath . $ALGoHelperPath -local @@ -78,7 +88,8 @@ CreateDevEnv ` -environmentName $environmentName ` -reuseExistingEnvironment:$reuseExistingEnvironment ` -baseFolder $baseFolder ` - -project $project + -project $project ` + -clean:$clean } catch { Write-Host -ForegroundColor Red "Error: $($_.Exception.Message)`nStacktrace: $($_.scriptStackTrace)" diff --git a/Build/projects/1st Party Apps (W1)/.AL-Go/localDevEnv.ps1 b/Build/projects/1st Party Apps (W1)/.AL-Go/localDevEnv.ps1 index a561a18d8f..0a2d7ad426 100644 --- a/Build/projects/1st Party Apps (W1)/.AL-Go/localDevEnv.ps1 +++ b/Build/projects/1st Party Apps (W1)/.AL-Go/localDevEnv.ps1 @@ -5,15 +5,32 @@ # Param( [string] $containerName = "", + [ValidateSet("UserPassword", "Windows")] [string] $auth = "", [pscredential] $credential = $null, [string] $licenseFileUrl = "", [switch] $fromVSCode, - [switch] $accept_insiderEula + [switch] $accept_insiderEula, + [switch] $clean ) $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 +function DownloadHelperFile { + param( + [string] $url, + [string] $folder + ) + + $prevProgressPreference = $ProgressPreference; $ProgressPreference = 'SilentlyContinue' + $name = [System.IO.Path]::GetFileName($url) + Write-Host "Downloading $name from $url" + $path = Join-Path $folder $name + Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path + $ProgressPreference = $prevProgressPreference + return $path +} + try { Clear-Host Write-Host @@ -27,17 +44,11 @@ Write-Host -ForegroundColor Yellow @' '@ -$webClient = New-Object System.Net.WebClient -$webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumentList ([System.Net.Cache.RequestCacheLevel]::NoCacheNoStore) -$webClient.Encoding = [System.Text.Encoding]::UTF8 -$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go/4c5bfbca1adebbf997f63882df4b9074a19aac1d/Actions/Github-Helper.psm1' -Write-Host "Downloading GitHub Helper module from $GitHubHelperUrl" -$GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1" -$webClient.DownloadFile($GitHubHelperUrl, $GitHubHelperPath) -$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go/4c5bfbca1adebbf997f63882df4b9074a19aac1d/Actions/AL-Go-Helper.ps1' -Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl" -$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" -$webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath) +$tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" +New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/006019b87cab11f6234d05f2c34372daf3c7075d/Actions/Github-Helper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/006019b87cab11f6234d05f2c34372daf3c7075d/Actions/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/006019b87cab11f6234d05f2c34372daf3c7075d/Actions/Packages.json' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath . $ALGoHelperPath -local @@ -134,7 +145,8 @@ CreateDevEnv ` -auth $auth ` -credential $credential ` -licenseFileUrl $licenseFileUrl ` - -accept_insiderEula:$accept_insiderEula + -accept_insiderEula:$accept_insiderEula ` + -clean:$clean } catch { Write-Host -ForegroundColor Red "Error: $($_.Exception.Message)`nStacktrace: $($_.scriptStackTrace)" diff --git a/Build/projects/1st Party Apps Tests (W1)/.AL-Go/cloudDevEnv.ps1 b/Build/projects/1st Party Apps Tests (W1)/.AL-Go/cloudDevEnv.ps1 index 38799b4107..90fd349744 100644 --- a/Build/projects/1st Party Apps Tests (W1)/.AL-Go/cloudDevEnv.ps1 +++ b/Build/projects/1st Party Apps Tests (W1)/.AL-Go/cloudDevEnv.ps1 @@ -6,11 +6,27 @@ Param( [string] $environmentName = "", [bool] $reuseExistingEnvironment, - [switch] $fromVSCode + [switch] $fromVSCode, + [switch] $clean ) $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 +function DownloadHelperFile { + param( + [string] $url, + [string] $folder + ) + + $prevProgressPreference = $ProgressPreference; $ProgressPreference = 'SilentlyContinue' + $name = [System.IO.Path]::GetFileName($url) + Write-Host "Downloading $name from $url" + $path = Join-Path $folder $name + Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path + $ProgressPreference = $prevProgressPreference + return $path +} + try { Clear-Host Write-Host @@ -24,17 +40,11 @@ Write-Host -ForegroundColor Yellow @' '@ -$webClient = New-Object System.Net.WebClient -$webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumentList ([System.Net.Cache.RequestCacheLevel]::NoCacheNoStore) -$webClient.Encoding = [System.Text.Encoding]::UTF8 -$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go/4c5bfbca1adebbf997f63882df4b9074a19aac1d/Actions/Github-Helper.psm1' -Write-Host "Downloading GitHub Helper module from $GitHubHelperUrl" -$GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1" -$webClient.DownloadFile($GitHubHelperUrl, $GitHubHelperPath) -$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go/4c5bfbca1adebbf997f63882df4b9074a19aac1d/Actions/AL-Go-Helper.ps1' -Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl" -$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" -$webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath) +$tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" +New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/006019b87cab11f6234d05f2c34372daf3c7075d/Actions/Github-Helper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/006019b87cab11f6234d05f2c34372daf3c7075d/Actions/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/006019b87cab11f6234d05f2c34372daf3c7075d/Actions/Packages.json' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath . $ALGoHelperPath -local @@ -78,7 +88,8 @@ CreateDevEnv ` -environmentName $environmentName ` -reuseExistingEnvironment:$reuseExistingEnvironment ` -baseFolder $baseFolder ` - -project $project + -project $project ` + -clean:$clean } catch { Write-Host -ForegroundColor Red "Error: $($_.Exception.Message)`nStacktrace: $($_.scriptStackTrace)" diff --git a/Build/projects/1st Party Apps Tests (W1)/.AL-Go/localDevEnv.ps1 b/Build/projects/1st Party Apps Tests (W1)/.AL-Go/localDevEnv.ps1 index a561a18d8f..0a2d7ad426 100644 --- a/Build/projects/1st Party Apps Tests (W1)/.AL-Go/localDevEnv.ps1 +++ b/Build/projects/1st Party Apps Tests (W1)/.AL-Go/localDevEnv.ps1 @@ -5,15 +5,32 @@ # Param( [string] $containerName = "", + [ValidateSet("UserPassword", "Windows")] [string] $auth = "", [pscredential] $credential = $null, [string] $licenseFileUrl = "", [switch] $fromVSCode, - [switch] $accept_insiderEula + [switch] $accept_insiderEula, + [switch] $clean ) $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 +function DownloadHelperFile { + param( + [string] $url, + [string] $folder + ) + + $prevProgressPreference = $ProgressPreference; $ProgressPreference = 'SilentlyContinue' + $name = [System.IO.Path]::GetFileName($url) + Write-Host "Downloading $name from $url" + $path = Join-Path $folder $name + Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path + $ProgressPreference = $prevProgressPreference + return $path +} + try { Clear-Host Write-Host @@ -27,17 +44,11 @@ Write-Host -ForegroundColor Yellow @' '@ -$webClient = New-Object System.Net.WebClient -$webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumentList ([System.Net.Cache.RequestCacheLevel]::NoCacheNoStore) -$webClient.Encoding = [System.Text.Encoding]::UTF8 -$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go/4c5bfbca1adebbf997f63882df4b9074a19aac1d/Actions/Github-Helper.psm1' -Write-Host "Downloading GitHub Helper module from $GitHubHelperUrl" -$GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1" -$webClient.DownloadFile($GitHubHelperUrl, $GitHubHelperPath) -$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go/4c5bfbca1adebbf997f63882df4b9074a19aac1d/Actions/AL-Go-Helper.ps1' -Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl" -$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" -$webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath) +$tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" +New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/006019b87cab11f6234d05f2c34372daf3c7075d/Actions/Github-Helper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/006019b87cab11f6234d05f2c34372daf3c7075d/Actions/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/006019b87cab11f6234d05f2c34372daf3c7075d/Actions/Packages.json' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath . $ALGoHelperPath -local @@ -134,7 +145,8 @@ CreateDevEnv ` -auth $auth ` -credential $credential ` -licenseFileUrl $licenseFileUrl ` - -accept_insiderEula:$accept_insiderEula + -accept_insiderEula:$accept_insiderEula ` + -clean:$clean } catch { Write-Host -ForegroundColor Red "Error: $($_.Exception.Message)`nStacktrace: $($_.scriptStackTrace)"