Skip to content

Commit

Permalink
Deploying AL-Go from main (e6f32930d61ce5fbf63e9567ee61492bb0ce0690) …
Browse files Browse the repository at this point in the history
…to main (#58)

Deploying AL-Go from main (e6f32930d61ce5fbf63e9567ee61492bb0ce0690) to
main

Co-authored-by: microsoft <[email protected]>
  • Loading branch information
bcbuild-github-agent and microsoft authored Apr 3, 2024
1 parent 1e6ebb5 commit 408a7ec
Show file tree
Hide file tree
Showing 20 changed files with 217 additions and 186 deletions.
4 changes: 2 additions & 2 deletions .AL-Go/cloudDevEnv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,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-Actions/v4.1/Github-Helper.psm1'
$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.0/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-Actions/v4.1/AL-Go-Helper.ps1'
$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.0/AL-Go-Helper.ps1'
Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl"
$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1"
$webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath)
Expand Down
4 changes: 2 additions & 2 deletions .AL-Go/localDevEnv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,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-Actions/v4.1/Github-Helper.psm1'
$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.0/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-Actions/v4.1/AL-Go-Helper.ps1'
$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.0/AL-Go-Helper.ps1'
Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl"
$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1"
$webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath)
Expand Down
20 changes: 19 additions & 1 deletion .github/RELEASENOTES.copy.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## v5.0

### Issues
- Issue 940 Publish to Environment is broken when specifying projects to publish
- Issue 994 CI/CD ignores Deploy to GitHub Pages in private repositories

### New Settings
- `UpdateALGoSystemFilesEnvironment`: The name of the environment that is referenced in job `UpdateALGoSystemFiles` in the _Update AL-Go System Files_ workflow. See [jobs.<job_id>.environment](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idenvironment) for more information. Currently, only setting the environment name is supported.

### Issues
- Support release branches that start with releases/
- Issue 870 Improve Error Handling when CLI is missing
- Issue 889 CreateRelease and IncrementVersionNumber workflow did not handle wild characters in `appFolders`, `testFolders` or `bcptTestFolders` settings.
- Issue 973 Prerelease is not used for deployment

### Build modes
AL-Go ships with Default, Translated and Clean mode out of the box. Now you can also define custom build modes in addition to the ones shipped with AL-Go. This allows you to define your own build modes, which can be used to build your apps in different ways. By default, a custom build mode will build the apps similarly to the Default mode but this behavior can be overridden in e.g. script overrides in your repository.

## v4.1

### New Settings
Expand Down Expand Up @@ -31,7 +49,7 @@ If false, the templateSha repository setting is used to download specific AL-Go
- **footer** = Footer for the documentation site. (Default: Made with...)
- **defaultIndexMD** = Markdown for the landing page of the documentation site. (Default: Reference documentation...)
- **defaultReleaseMD** = Markdown for the landing page of the release sites. (Default: Release reference documentation...)
- *Note that in header, footer, defaultIndexMD and defaultReleaseMD you can use the following placeholders: {REPOSITORY}, {VERSION}, {INDEXTEMPLATERELATIVEPATH}, {RELEASENOTES}*
- *Note that in header, footer, defaultIndexMD and defaultReleaseMD you can use the following placeholders: {REPOSITORY}, {VERSION}, {INDEXTEMPLATERELATIVEPATH}, {RELEASENOTES}*

### New Workflows
- **Deploy Reference Documentation** is a workflow, which you can invoke manually or on a schedule to generate and deploy reference documentation using the aldoc tool, using the ALDoc setting properties described above.
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/AddExistingAppOrTestApp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,36 +39,36 @@ jobs:
runs-on: [ windows-latest ]
steps:
- name: Dump Workflow Information
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v4.1
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.0
with:
shell: powershell

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize the workflow
id: init
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v4.1
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.0
with:
shell: powershell
eventId: "DO0090"

- name: Read settings
uses: microsoft/AL-Go-Actions/ReadSettings@v4.1
uses: microsoft/AL-Go-Actions/ReadSettings@v5.0
with:
shell: powershell

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

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

- name: Finalize the workflow
if: always()
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v4.1
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.0
with:
shell: powershell
eventId: "DO0090"
Expand Down
65 changes: 33 additions & 32 deletions .github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ defaults:
permissions:
contents: read
actions: read
pages: read

env:
workflowDepth: 1
Expand All @@ -42,25 +43,25 @@ jobs:
workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }}
steps:
- name: Dump Workflow Information
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v4.1
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.0
with:
shell: powershell

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: true

- name: Initialize the workflow
id: init
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v4.1
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.0
with:
shell: powershell
eventId: "DO0091"

- name: Read settings
id: ReadSettings
uses: microsoft/AL-Go-Actions/ReadSettings@v4.1
uses: microsoft/AL-Go-Actions/ReadSettings@v5.0
with:
shell: powershell
get: type
Expand All @@ -72,30 +73,30 @@ jobs:
- name: Determine Projects To Build
id: determineProjectsToBuild
uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v4.1
uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.0
with:
shell: powershell
maxBuildDepth: ${{ env.workflowDepth }}

- name: Determine Delivery Target Secrets
id: DetermineDeliveryTargetSecrets
uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v4.1
uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v5.0
with:
shell: powershell
projectsJson: '${{ steps.determineProjectsToBuild.outputs.ProjectsJson }}'
checkContextSecrets: 'false'

- name: Read secrets
id: ReadSecrets
uses: microsoft/AL-Go-Actions/ReadSecrets@v4.1
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.0
with:
shell: powershell
gitHubSecrets: ${{ toJson(secrets) }}
getSecrets: ${{ steps.DetermineDeliveryTargetSecrets.outputs.ContextSecrets }}

- name: Determine Delivery Targets
id: DetermineDeliveryTargets
uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v4.1
uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v5.0
env:
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
with:
Expand All @@ -105,7 +106,7 @@ jobs:

- name: Determine Deployment Environments
id: DetermineDeploymentEnvironments
uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v4.1
uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v5.0
env:
GITHUB_TOKEN: ${{ github.token }}
with:
Expand All @@ -118,16 +119,16 @@ jobs:
runs-on: [ windows-latest ]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Read settings
uses: microsoft/AL-Go-Actions/ReadSettings@v4.1
uses: microsoft/AL-Go-Actions/ReadSettings@v5.0
with:
shell: powershell
get: templateUrl

- name: Check for updates to AL-Go system files
uses: microsoft/AL-Go-Actions/CheckForUpdates@v4.1
uses: microsoft/AL-Go-Actions/CheckForUpdates@v5.0
with:
shell: powershell
templateUrl: ${{ env.templateUrl }}
Expand All @@ -153,7 +154,7 @@ jobs:
projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }}
secrets: 'licenseFileUrl,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.deliveryTargetsJson != '[]' || needs.Initialization.outputs.environmentCount > 0 }}
publishArtifacts: ${{ github.ref_name == 'main' || startswith(github.ref_name, 'release/') || startswith(github.ref_name, 'releases/') || needs.Initialization.outputs.deliveryTargetsJson != '[]' || needs.Initialization.outputs.environmentCount > 0 }}
signArtifacts: true
useArtifactCache: true

Expand All @@ -172,37 +173,37 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: '.artifacts'

- name: Read settings
uses: microsoft/AL-Go-Actions/ReadSettings@v4.1
uses: microsoft/AL-Go-Actions/ReadSettings@v5.0
with:
shell: powershell

- name: Setup Pages
if: needs.Initialization.outputs.deployALDocArtifact == 1
uses: actions/configure-pages@v3
uses: actions/configure-pages@v5

- name: Build Reference Documentation
uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v4.1
uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v5.0
with:
shell: powershell
artifacts: '.artifacts'

- name: Upload pages artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: ".aldoc/_site/"

- name: Deploy to GitHub Pages
if: needs.Initialization.outputs.deployALDocArtifact == 1
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4

Deploy:
needs: [ Initialization, Build ]
Expand All @@ -215,15 +216,15 @@ jobs:
url: ${{ steps.Deploy.outputs.environmentUrl }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: '.artifacts'

- name: Read settings
uses: microsoft/AL-Go-Actions/ReadSettings@v4.1
uses: microsoft/AL-Go-Actions/ReadSettings@v5.0
with:
shell: powershell

Expand All @@ -236,15 +237,15 @@ jobs:
- name: Read secrets
id: ReadSecrets
uses: microsoft/AL-Go-Actions/ReadSecrets@v4.1
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.0
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
id: Deploy
uses: microsoft/AL-Go-Actions/Deploy@v4.1
uses: microsoft/AL-Go-Actions/Deploy@v5.0
env:
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
with:
Expand All @@ -265,28 +266,28 @@ jobs:
name: Deliver to ${{ matrix.deliveryTarget }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: '.artifacts'

- name: Read settings
uses: microsoft/AL-Go-Actions/ReadSettings@v4.1
uses: microsoft/AL-Go-Actions/ReadSettings@v5.0
with:
shell: powershell

- name: Read secrets
id: ReadSecrets
uses: microsoft/AL-Go-Actions/ReadSecrets@v4.1
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.0
with:
shell: powershell
gitHubSecrets: ${{ toJson(secrets) }}
getSecrets: '${{ matrix.deliveryTarget }}Context'

- name: Deliver
uses: microsoft/AL-Go-Actions/Deliver@v4.1
uses: microsoft/AL-Go-Actions/Deliver@v5.0
env:
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
with:
Expand All @@ -302,11 +303,11 @@ jobs:
runs-on: [ windows-latest ]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Finalize the workflow
id: PostProcess
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v4.1
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.0
with:
shell: powershell
eventId: "DO0091"
Expand Down
Loading

0 comments on commit 408a7ec

Please sign in to comment.