Skip to content

Commit

Permalink
Update AL-Go System Files
Browse files Browse the repository at this point in the history
  • Loading branch information
freddydk committed Apr 12, 2024
1 parent 1a5f6e5 commit 1a52c7f
Show file tree
Hide file tree
Showing 28 changed files with 188 additions and 230 deletions.
4 changes: 2 additions & 2 deletions .github/AL-Go-Settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "PTE",
"templateUrl": "https://github.com/freddydk/AL-Go@PPP",
"templateUrl": "https://github.com/freddydk/AL-Go@issue1009",
"CICDPushBranches": [
"main",
"release/*",
Expand Down Expand Up @@ -31,6 +31,6 @@
"DeliverToStorage": {
"CreateContainerIfNotExist": true
},
"templateSha": "b35d94689355e95cb5e3055717ca44243a77d6cb",
"templateSha": "fba454a230aa4bdd4b5d4de5db363cae23115008",
"RepoVersion": "1.0"
}
12 changes: 6 additions & 6 deletions .github/workflows/AddExistingAppOrTestApp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
runs-on: [ windows-latest ]
steps:
- name: Dump Workflow Information
uses: freddydk/AL-Go/Actions/DumpWorkflowInfo@PPP
uses: freddydk/AL-Go/Actions/DumpWorkflowInfo@issue1009
with:
shell: powershell

Expand All @@ -48,27 +48,27 @@ jobs:

- name: Initialize the workflow
id: init
uses: freddydk/AL-Go/Actions/WorkflowInitialize@PPP
uses: freddydk/AL-Go/Actions/WorkflowInitialize@issue1009
with:
shell: powershell
eventId: "DO0090"

- name: Read settings
uses: freddydk/AL-Go/Actions/ReadSettings@PPP
uses: freddydk/AL-Go/Actions/ReadSettings@issue1009
with:
shell: powershell

- name: Read secrets
id: ReadSecrets
uses: freddydk/AL-Go/Actions/ReadSecrets@PPP
uses: freddydk/AL-Go/Actions/ReadSecrets@issue1009
with:
shell: powershell
gitHubSecrets: ${{ toJson(secrets) }}
getSecrets: 'TokenForPush'
useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}'

- name: Add existing app
uses: freddydk/AL-Go/Actions/AddExistingApp@PPP
uses: freddydk/AL-Go/Actions/AddExistingApp@issue1009
with:
shell: powershell
token: ${{ steps.ReadSecrets.outputs.TokenForPush }}
Expand All @@ -79,7 +79,7 @@ jobs:

- name: Finalize the workflow
if: always()
uses: freddydk/AL-Go/Actions/WorkflowPostProcess@PPP
uses: freddydk/AL-Go/Actions/WorkflowPostProcess@issue1009
with:
shell: powershell
eventId: "DO0090"
Expand Down
91 changes: 29 additions & 62 deletions .github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ 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: freddydk/AL-Go/Actions/DumpWorkflowInfo@PPP
uses: freddydk/AL-Go/Actions/DumpWorkflowInfo@issue1009
with:
shell: powershell

Expand All @@ -55,17 +54,17 @@ jobs:

- name: Initialize the workflow
id: init
uses: freddydk/AL-Go/Actions/WorkflowInitialize@PPP
uses: freddydk/AL-Go/Actions/WorkflowInitialize@issue1009
with:
shell: powershell
eventId: "DO0091"

- name: Read settings
id: ReadSettings
uses: freddydk/AL-Go/Actions/ReadSettings@PPP
uses: freddydk/AL-Go/Actions/ReadSettings@issue1009
with:
shell: powershell
get: type, powerPlatformSolutionFolder
get: type

- name: Determine Workflow Depth
id: DetermineWorkflowDepth
Expand All @@ -74,36 +73,30 @@ jobs:
- name: Determine Projects To Build
id: determineProjectsToBuild
uses: freddydk/AL-Go/Actions/DetermineProjectsToBuild@PPP
uses: freddydk/AL-Go/Actions/DetermineProjectsToBuild@issue1009
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: freddydk/AL-Go/Actions/DetermineDeliveryTargets@PPP
uses: freddydk/AL-Go/Actions/DetermineDeliveryTargets@issue1009
with:
shell: powershell
projectsJson: '${{ steps.determineProjectsToBuild.outputs.ProjectsJson }}'
checkContextSecrets: 'false'

- name: Read secrets
id: ReadSecrets
uses: freddydk/AL-Go/Actions/ReadSecrets@PPP
uses: freddydk/AL-Go/Actions/ReadSecrets@issue1009
with:
shell: powershell
gitHubSecrets: ${{ toJson(secrets) }}
getSecrets: ${{ steps.DetermineDeliveryTargetSecrets.outputs.ContextSecrets }}

- name: Determine Delivery Targets
id: DetermineDeliveryTargets
uses: freddydk/AL-Go/Actions/DetermineDeliveryTargets@PPP
uses: freddydk/AL-Go/Actions/DetermineDeliveryTargets@issue1009
env:
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
with:
Expand All @@ -113,7 +106,7 @@ jobs:

- name: Determine Deployment Environments
id: DetermineDeploymentEnvironments
uses: freddydk/AL-Go/Actions/DetermineDeploymentEnvironments@PPP
uses: freddydk/AL-Go/Actions/DetermineDeploymentEnvironments@issue1009
env:
GITHUB_TOKEN: ${{ github.token }}
with:
Expand All @@ -129,13 +122,13 @@ jobs:
uses: actions/checkout@v4

- name: Read settings
uses: freddydk/AL-Go/Actions/ReadSettings@PPP
uses: freddydk/AL-Go/Actions/ReadSettings@issue1009
with:
shell: powershell
get: templateUrl

- name: Check for updates to AL-Go system files
uses: freddydk/AL-Go/Actions/CheckForUpdates@PPP
uses: freddydk/AL-Go/Actions/CheckForUpdates@issue1009
with:
shell: powershell
templateUrl: ${{ env.templateUrl }}
Expand Down Expand Up @@ -213,27 +206,13 @@ 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: (!cancelled()) && needs.Build.result == 'Success' && needs.Initialization.outputs.generateALDocArtifact == 1 && github.ref_name == 'main'
if: always() && 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
Expand All @@ -250,7 +229,7 @@ jobs:
path: '.artifacts'

- name: Read settings
uses: freddydk/AL-Go/Actions/ReadSettings@PPP
uses: freddydk/AL-Go/Actions/ReadSettings@issue1009
with:
shell: powershell

Expand All @@ -259,7 +238,7 @@ jobs:
uses: actions/configure-pages@v5

- name: Build Reference Documentation
uses: freddydk/AL-Go/Actions/BuildReferenceDocumentation@PPP
uses: freddydk/AL-Go/Actions/BuildReferenceDocumentation@issue1009
with:
shell: powershell
artifacts: '.artifacts'
Expand All @@ -275,8 +254,8 @@ jobs:
uses: actions/deploy-pages@v4

Deploy:
needs: [ Initialization, Build, BuildPP ]
if: (!cancelled()) && needs.Build.result != 'Failure' && needs.BuildPP.result != 'Failure' && needs.Initialization.outputs.environmentCount > 0
needs: [ Initialization, Build ]
if: always() && needs.Build.result == 'Success' && needs.Initialization.outputs.environmentCount > 0
strategy: ${{ fromJson(needs.Initialization.outputs.environmentsMatrixJson) }}
runs-on: ${{ fromJson(matrix.os) }}
name: Deploy to ${{ matrix.environment }}
Expand All @@ -293,10 +272,9 @@ jobs:
path: '.artifacts'

- name: Read settings
uses: freddydk/AL-Go/Actions/ReadSettings@PPP
uses: freddydk/AL-Go/Actions/ReadSettings@issue1009
with:
shell: powershell
get: type,powerPlatformSolutionFolder

- name: EnvName
id: envName
Expand All @@ -307,38 +285,27 @@ jobs:
- name: Read secrets
id: ReadSecrets
uses: freddydk/AL-Go/Actions/ReadSecrets@PPP
uses: freddydk/AL-Go/Actions/ReadSecrets@issue1009
with:
shell: powershell
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: Deploy to Business Central
- name: Deploy
id: Deploy
uses: freddydk/AL-Go/Actions/Deploy@PPP
uses: freddydk/AL-Go/Actions/Deploy@issue1009
env:
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
with:
shell: powershell
environmentName: ${{ matrix.environment }}
artifactsFolder: '.artifacts'
artifacts: '.artifacts'
type: 'CD'
deploymentEnvironmentsJson: ${{ needs.Initialization.outputs.deploymentEnvironmentsJson }}

- name: Deploy to Power Platform
if: env.type == 'PTE' && env.powerPlatformSolutionFolder != ''
uses: freddydk/AL-Go/Actions/DeployPowerPlatform@PPP
env:
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
with:
shell: powershell
environmentName: ${{ matrix.environment }}
artifactsFolder: '.artifacts'
deploymentEnvironmentsJson: ${{ needs.Initialization.outputs.deploymentEnvironmentsJson }}

Deliver:
needs: [ Initialization, Build, BuildPP ]
if: (!cancelled()) && needs.Build.result != 'Failure' && needs.BuildPP.result != 'Failure' && needs.Initialization.outputs.deliveryTargetsJson != '[]'
needs: [ Initialization, Build ]
if: always() && needs.Build.result == 'Success' && needs.Initialization.outputs.deliveryTargetsJson != '[]'
strategy:
matrix:
deliveryTarget: ${{ fromJson(needs.Initialization.outputs.deliveryTargetsJson) }}
Expand All @@ -355,20 +322,20 @@ jobs:
path: '.artifacts'

- name: Read settings
uses: freddydk/AL-Go/Actions/ReadSettings@PPP
uses: freddydk/AL-Go/Actions/ReadSettings@issue1009
with:
shell: powershell

- name: Read secrets
id: ReadSecrets
uses: freddydk/AL-Go/Actions/ReadSecrets@PPP
uses: freddydk/AL-Go/Actions/ReadSecrets@issue1009
with:
shell: powershell
gitHubSecrets: ${{ toJson(secrets) }}
getSecrets: '${{ matrix.deliveryTarget }}Context'

- name: Deliver
uses: freddydk/AL-Go/Actions/Deliver@PPP
uses: freddydk/AL-Go/Actions/Deliver@issue1009
env:
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
with:
Expand All @@ -379,7 +346,7 @@ jobs:
artifacts: '.artifacts'

PostProcess:
needs: [ Initialization, Build, BuildPP, Deploy, Deliver, DeployALDoc ]
needs: [ Initialization, Build, Deploy, Deliver, DeployALDoc ]
if: (!cancelled())
runs-on: [ windows-latest ]
steps:
Expand All @@ -388,7 +355,7 @@ jobs:

- name: Finalize the workflow
id: PostProcess
uses: freddydk/AL-Go/Actions/WorkflowPostProcess@PPP
uses: freddydk/AL-Go/Actions/WorkflowPostProcess@issue1009
with:
shell: powershell
eventId: "DO0091"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/CreateApp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: [ windows-latest ]
steps:
- name: Dump Workflow Information
uses: freddydk/AL-Go/Actions/DumpWorkflowInfo@PPP
uses: freddydk/AL-Go/Actions/DumpWorkflowInfo@issue1009
with:
shell: powershell

Expand All @@ -58,28 +58,28 @@ jobs:

- name: Initialize the workflow
id: init
uses: freddydk/AL-Go/Actions/WorkflowInitialize@PPP
uses: freddydk/AL-Go/Actions/WorkflowInitialize@issue1009
with:
shell: powershell
eventId: "DO0092"

- name: Read settings
uses: freddydk/AL-Go/Actions/ReadSettings@PPP
uses: freddydk/AL-Go/Actions/ReadSettings@issue1009
with:
shell: powershell
get: type

- name: Read secrets
id: ReadSecrets
uses: freddydk/AL-Go/Actions/ReadSecrets@PPP
uses: freddydk/AL-Go/Actions/ReadSecrets@issue1009
with:
shell: powershell
gitHubSecrets: ${{ toJson(secrets) }}
getSecrets: 'TokenForPush'
useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}'

- name: Creating a new app
uses: freddydk/AL-Go/Actions/CreateApp@PPP
uses: freddydk/AL-Go/Actions/CreateApp@issue1009
with:
shell: powershell
token: ${{ steps.ReadSecrets.outputs.TokenForPush }}
Expand All @@ -94,7 +94,7 @@ jobs:

- name: Finalize the workflow
if: always()
uses: freddydk/AL-Go/Actions/WorkflowPostProcess@PPP
uses: freddydk/AL-Go/Actions/WorkflowPostProcess@issue1009
with:
shell: powershell
eventId: "DO0092"
Expand Down
Loading

0 comments on commit 1a52c7f

Please sign in to comment.