Skip to content

Commit

Permalink
Deploying AL-Go from main (92365fbce2f60a8b26758608f36f9e24265646d4) …
Browse files Browse the repository at this point in the history
…to main
  • Loading branch information
microsoft committed May 2, 2024
1 parent 35a5931 commit a7f5f32
Show file tree
Hide file tree
Showing 21 changed files with 227 additions and 154 deletions.
10 changes: 6 additions & 4 deletions .AL-Go/cloudDevEnv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
Param(
[string] $environmentName = "",
[bool] $reuseExistingEnvironment,
[switch] $fromVSCode
[switch] $fromVSCode,
[switch] $clean
)

$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
Expand All @@ -27,11 +28,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/v5.0/Github-Helper.psm1'
$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.1/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/v5.0/AL-Go-Helper.ps1'
$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.1/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 Expand Up @@ -78,7 +79,8 @@ CreateDevEnv `
-environmentName $environmentName `
-reuseExistingEnvironment:$reuseExistingEnvironment `
-baseFolder $baseFolder `
-project $project
-project $project `
-clean:$clean
}
catch {
Write-Host -ForegroundColor Red "Error: $($_.Exception.Message)`nStacktrace: $($_.scriptStackTrace)"
Expand Down
15 changes: 9 additions & 6 deletions .AL-Go/localDevEnv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
#
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
Expand All @@ -30,11 +32,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/v5.0/Github-Helper.psm1'
$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.1/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/v5.0/AL-Go-Helper.ps1'
$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.1/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 Expand Up @@ -104,8 +106,8 @@ if (-not $credential) {

if (-not $licenseFileUrl) {
if ($settings.type -eq "AppSource App") {
$description = "When developing AppSource Apps, your local development environment needs the developer licensefile with permissions to your AppSource app object IDs"
$default = ""
$description = "When developing AppSource Apps for Business Central versions prior to 22, your local development environment needs the developer licensefile with permissions to your AppSource app object IDs"
$default = "none"
}
else {
$description = "When developing PTEs, you can optionally specify a developer licensefile with permissions to object IDs of your dependant apps"
Expand Down Expand Up @@ -134,7 +136,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)"
Expand Down
44 changes: 44 additions & 0 deletions .github/RELEASENOTES.copy.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
## v5.1

### Issues

- Issue 1019 CI/CD Workflow still being scheduled after it was disabled
- Issue 1021 Error during Create Online Development Environment action
- Issue 1022 Error querying artifacts: No such host is known. (bcartifacts-exdbf9fwegejdqak.blob.core.windows.net:443)
- Issue 922 Deploy Reference Documentation (ALDoc) failed with custom
- ContainerName used during build was invalid if project names contained special characters
- Issue 1009 by adding a includeDependencies property in DeliverToAppSource
- Issue 997 'Deliver to AppSource' action fails for projects containing a space
- Issue 987 Resource not accessible by integration when creating release from specific version
- Issue 979 Publish to AppSource Documentation
- Issue 1018 Artifact setting - possibility to read version from app.json
- Issue 1008 Allow PullRequestHandler to use ubuntu or self hosted runners for all jobs except for pregateCheck
- Issue 962 Finer control of "shell"-property
- Issue 1041 Harden the version comparison when incrementing version number
- Issue 1042 Downloading artifacts from GitHub doesn't work with branch names which include forward slashes

### Better artifact selection

The artifact setting in your project settings file can now contain a `*` instead of the version number. This means that AL-Go for GitHub will determine the application dependency for your projects together with the `applicationDependency` setting and determine which Business Central version is needed for the project.
- `"artifact": "//*//latest"` will give you the latest Business Central version, higher than your application dependency and with the same major.minor as your application dependency.
- `"artifact": "//*//first"` will give you the first Business Central version, higher than your application dependency and with the same major.minor as your application dependency.

### New Settings

- `deliverToAppSource`: a JSON object containing the following properties
- **productId** must be the product Id from partner Center.
- **mainAppFolder** specifies the appFolder of the main app if you have multiple apps in the same project.
- **continuousDelivery** can be set to true to enable continuous delivery of every successful build to AppSource Validation. Note that the app will only be in preview in AppSource and you will need to manually press GO LIVE in order for the app to be promoted to production.
- **includeDependencies** can be set to an array of file names (incl. wildcards) which are the names of the dependencies to include in the AppSource submission. Note that you need to set `generateDependencyArtifact` in the project settings file to true in order to include dependencies.
- Add `shell` as a property under `DeployTo` structure

### Deprecated Settings

- `appSourceContinuousDelivery` is moved to the `deliverToAppSource` structure
- `appSourceMainAppFolder` is moved to the `deliverToAppSource` structure
- `appSourceProductId` is moved to the `deliverToAppSource` structure

### New parameter -clean on localdevenv and clouddevenv

Adding -clean when running localdevenv or clouddevenv will create a clean development environment without compiling and publishing your apps.

## v5.0

### Issues
Expand Down
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: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.0
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1
with:
shell: powershell

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

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

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

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

- name: Add existing app
uses: microsoft/AL-Go-Actions/AddExistingApp@v5.0
uses: microsoft/AL-Go-Actions/AddExistingApp@v5.1
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@v5.0
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1
with:
shell: powershell
eventId: "DO0090"
Expand Down
49 changes: 26 additions & 23 deletions .github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }}
steps:
- name: Dump Workflow Information
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.0
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1
with:
shell: powershell

Expand All @@ -54,14 +54,14 @@ jobs:

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

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

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

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

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

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

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

- name: Check for updates to AL-Go system files
uses: microsoft/AL-Go-Actions/CheckForUpdates@v5.0
uses: microsoft/AL-Go-Actions/CheckForUpdates@v5.1
with:
shell: powershell
templateUrl: ${{ env.templateUrl }}
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
runs-on: windows-latest
name: Deploy Reference Documentation
permissions:
contents: write
contents: read
actions: read
pages: write
id-token: write
Expand All @@ -181,7 +181,7 @@ jobs:
path: '.artifacts'

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

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

- name: Build Reference Documentation
uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v5.0
uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v5.1
with:
shell: powershell
artifacts: '.artifacts'
Expand All @@ -211,6 +211,9 @@ jobs:
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 }}
Expand All @@ -224,9 +227,9 @@ jobs:
path: '.artifacts'

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

- name: EnvName
id: envName
Expand All @@ -237,19 +240,19 @@ jobs:
- name: Read secrets
id: ReadSecrets
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.0
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1
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'

- name: Deploy
id: Deploy
uses: microsoft/AL-Go-Actions/Deploy@v5.0
uses: microsoft/AL-Go-Actions/Deploy@v5.1
env:
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
with:
shell: powershell
shell: ${{ matrix.shell }}
environmentName: ${{ matrix.environment }}
artifacts: '.artifacts'
type: 'CD'
Expand All @@ -274,20 +277,20 @@ jobs:
path: '.artifacts'

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

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

- name: Deliver
uses: microsoft/AL-Go-Actions/Deliver@v5.0
uses: microsoft/AL-Go-Actions/Deliver@v5.1
env:
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
with:
Expand All @@ -307,7 +310,7 @@ jobs:

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

0 comments on commit a7f5f32

Please sign in to comment.