Skip to content

Commit 0af8feb

Browse files
bcbuild-github-agentmicrosoft
andauthored
Deploying AL-Go from main (92365fbce2f60a8b26758608f36f9e24265646d4) to main (#65)
Deploying AL-Go from main (92365fbce2f60a8b26758608f36f9e24265646d4) to main Co-authored-by: microsoft <microsoft@users.noreply.github.com>
1 parent 408a7ec commit 0af8feb

20 files changed

+218
-146
lines changed

.AL-Go/cloudDevEnv.ps1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
Param(
77
[string] $environmentName = "",
88
[bool] $reuseExistingEnvironment,
9-
[switch] $fromVSCode
9+
[switch] $fromVSCode,
10+
[switch] $clean
1011
)
1112

1213
$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
@@ -27,11 +28,11 @@ Write-Host -ForegroundColor Yellow @'
2728
$webClient = New-Object System.Net.WebClient
2829
$webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumentList ([System.Net.Cache.RequestCacheLevel]::NoCacheNoStore)
2930
$webClient.Encoding = [System.Text.Encoding]::UTF8
30-
$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.0/Github-Helper.psm1'
31+
$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.1/Github-Helper.psm1'
3132
Write-Host "Downloading GitHub Helper module from $GitHubHelperUrl"
3233
$GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1"
3334
$webClient.DownloadFile($GitHubHelperUrl, $GitHubHelperPath)
34-
$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.0/AL-Go-Helper.ps1'
35+
$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.1/AL-Go-Helper.ps1'
3536
Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl"
3637
$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1"
3738
$webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath)
@@ -78,7 +79,8 @@ CreateDevEnv `
7879
-environmentName $environmentName `
7980
-reuseExistingEnvironment:$reuseExistingEnvironment `
8081
-baseFolder $baseFolder `
81-
-project $project
82+
-project $project `
83+
-clean:$clean
8284
}
8385
catch {
8486
Write-Host -ForegroundColor Red "Error: $($_.Exception.Message)`nStacktrace: $($_.scriptStackTrace)"

.AL-Go/localDevEnv.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
#
66
Param(
77
[string] $containerName = "",
8+
[ValidateSet("UserPassword", "Windows")]
89
[string] $auth = "",
910
[pscredential] $credential = $null,
1011
[string] $licenseFileUrl = "",
1112
[switch] $fromVSCode,
12-
[switch] $accept_insiderEula
13+
[switch] $accept_insiderEula,
14+
[switch] $clean
1315
)
1416

1517
$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
@@ -30,11 +32,11 @@ Write-Host -ForegroundColor Yellow @'
3032
$webClient = New-Object System.Net.WebClient
3133
$webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumentList ([System.Net.Cache.RequestCacheLevel]::NoCacheNoStore)
3234
$webClient.Encoding = [System.Text.Encoding]::UTF8
33-
$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.0/Github-Helper.psm1'
35+
$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.1/Github-Helper.psm1'
3436
Write-Host "Downloading GitHub Helper module from $GitHubHelperUrl"
3537
$GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1"
3638
$webClient.DownloadFile($GitHubHelperUrl, $GitHubHelperPath)
37-
$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.0/AL-Go-Helper.ps1'
39+
$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.1/AL-Go-Helper.ps1'
3840
Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl"
3941
$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1"
4042
$webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath)
@@ -134,7 +136,8 @@ CreateDevEnv `
134136
-auth $auth `
135137
-credential $credential `
136138
-licenseFileUrl $licenseFileUrl `
137-
-accept_insiderEula:$accept_insiderEula
139+
-accept_insiderEula:$accept_insiderEula `
140+
-clean:$clean
138141
}
139142
catch {
140143
Write-Host -ForegroundColor Red "Error: $($_.Exception.Message)`nStacktrace: $($_.scriptStackTrace)"

.github/RELEASENOTES.copy.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,47 @@
1+
## v5.1
2+
3+
### Issues
4+
5+
- Issue 1019 CI/CD Workflow still being scheduled after it was disabled
6+
- Issue 1021 Error during Create Online Development Environment action
7+
- Issue 1022 Error querying artifacts: No such host is known. (bcartifacts-exdbf9fwegejdqak.blob.core.windows.net:443)
8+
- Issue 922 Deploy Reference Documentation (ALDoc) failed with custom
9+
- ContainerName used during build was invalid if project names contained special characters
10+
- Issue 1009 by adding a includeDependencies property in DeliverToAppSource
11+
- Issue 997 'Deliver to AppSource' action fails for projects containing a space
12+
- Issue 987 Resource not accessible by integration when creating release from specific version
13+
- Issue 979 Publish to AppSource Documentation
14+
- Issue 1018 Artifact setting - possibility to read version from app.json
15+
- Issue 1008 Allow PullRequestHandler to use ubuntu or self hosted runners for all jobs except for pregateCheck
16+
- Issue 962 Finer control of "shell"-property
17+
- Issue 1041 Harden the version comparison when incrementing version number
18+
- Issue 1042 Downloading artifacts from GitHub doesn't work with branch names which include forward slashes
19+
20+
### Better artifact selection
21+
22+
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.
23+
- `"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.
24+
- `"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.
25+
26+
### New Settings
27+
28+
- `deliverToAppSource`: a JSON object containing the following properties
29+
- **productId** must be the product Id from partner Center.
30+
- **mainAppFolder** specifies the appFolder of the main app if you have multiple apps in the same project.
31+
- **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.
32+
- **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.
33+
- Add `shell` as a property under `DeployTo` structure
34+
35+
### Deprecated Settings
36+
37+
- `appSourceContinuousDelivery` is moved to the `deliverToAppSource` structure
38+
- `appSourceMainAppFolder` is moved to the `deliverToAppSource` structure
39+
- `appSourceProductId` is moved to the `deliverToAppSource` structure
40+
41+
### New parameter -clean on localdevenv and clouddevenv
42+
43+
Adding -clean when running localdevenv or clouddevenv will create a clean development environment without compiling and publishing your apps.
44+
145
## v5.0
246

347
### Issues

.github/workflows/AddExistingAppOrTestApp.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
runs-on: [ windows-latest ]
4040
steps:
4141
- name: Dump Workflow Information
42-
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.0
42+
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1
4343
with:
4444
shell: powershell
4545

@@ -48,27 +48,27 @@ jobs:
4848

4949
- name: Initialize the workflow
5050
id: init
51-
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.0
51+
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1
5252
with:
5353
shell: powershell
5454
eventId: "DO0090"
5555

5656
- name: Read settings
57-
uses: microsoft/AL-Go-Actions/ReadSettings@v5.0
57+
uses: microsoft/AL-Go-Actions/ReadSettings@v5.1
5858
with:
5959
shell: powershell
6060

6161
- name: Read secrets
6262
id: ReadSecrets
63-
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.0
63+
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1
6464
with:
6565
shell: powershell
6666
gitHubSecrets: ${{ toJson(secrets) }}
6767
getSecrets: 'TokenForPush'
6868
useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}'
6969

7070
- name: Add existing app
71-
uses: microsoft/AL-Go-Actions/AddExistingApp@v5.0
71+
uses: microsoft/AL-Go-Actions/AddExistingApp@v5.1
7272
with:
7373
shell: powershell
7474
token: ${{ steps.ReadSecrets.outputs.TokenForPush }}
@@ -79,7 +79,7 @@ jobs:
7979

8080
- name: Finalize the workflow
8181
if: always()
82-
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.0
82+
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1
8383
with:
8484
shell: powershell
8585
eventId: "DO0090"

.github/workflows/CICD.yaml

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }}
4444
steps:
4545
- name: Dump Workflow Information
46-
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.0
46+
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1
4747
with:
4848
shell: powershell
4949

@@ -54,14 +54,14 @@ jobs:
5454

5555
- name: Initialize the workflow
5656
id: init
57-
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.0
57+
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1
5858
with:
5959
shell: powershell
6060
eventId: "DO0091"
6161

6262
- name: Read settings
6363
id: ReadSettings
64-
uses: microsoft/AL-Go-Actions/ReadSettings@v5.0
64+
uses: microsoft/AL-Go-Actions/ReadSettings@v5.1
6565
with:
6666
shell: powershell
6767
get: type
@@ -73,30 +73,30 @@ jobs:
7373
7474
- name: Determine Projects To Build
7575
id: determineProjectsToBuild
76-
uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.0
76+
uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.1
7777
with:
7878
shell: powershell
7979
maxBuildDepth: ${{ env.workflowDepth }}
8080

8181
- name: Determine Delivery Target Secrets
8282
id: DetermineDeliveryTargetSecrets
83-
uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v5.0
83+
uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v5.1
8484
with:
8585
shell: powershell
8686
projectsJson: '${{ steps.determineProjectsToBuild.outputs.ProjectsJson }}'
8787
checkContextSecrets: 'false'
8888

8989
- name: Read secrets
9090
id: ReadSecrets
91-
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.0
91+
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1
9292
with:
9393
shell: powershell
9494
gitHubSecrets: ${{ toJson(secrets) }}
9595
getSecrets: ${{ steps.DetermineDeliveryTargetSecrets.outputs.ContextSecrets }}
9696

9797
- name: Determine Delivery Targets
9898
id: DetermineDeliveryTargets
99-
uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v5.0
99+
uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v5.1
100100
env:
101101
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
102102
with:
@@ -106,7 +106,7 @@ jobs:
106106

107107
- name: Determine Deployment Environments
108108
id: DetermineDeploymentEnvironments
109-
uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v5.0
109+
uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v5.1
110110
env:
111111
GITHUB_TOKEN: ${{ github.token }}
112112
with:
@@ -122,13 +122,13 @@ jobs:
122122
uses: actions/checkout@v4
123123

124124
- name: Read settings
125-
uses: microsoft/AL-Go-Actions/ReadSettings@v5.0
125+
uses: microsoft/AL-Go-Actions/ReadSettings@v5.1
126126
with:
127127
shell: powershell
128128
get: templateUrl
129129

130130
- name: Check for updates to AL-Go system files
131-
uses: microsoft/AL-Go-Actions/CheckForUpdates@v5.0
131+
uses: microsoft/AL-Go-Actions/CheckForUpdates@v5.1
132132
with:
133133
shell: powershell
134134
templateUrl: ${{ env.templateUrl }}
@@ -164,7 +164,7 @@ jobs:
164164
runs-on: windows-latest
165165
name: Deploy Reference Documentation
166166
permissions:
167-
contents: write
167+
contents: read
168168
actions: read
169169
pages: write
170170
id-token: write
@@ -181,7 +181,7 @@ jobs:
181181
path: '.artifacts'
182182

183183
- name: Read settings
184-
uses: microsoft/AL-Go-Actions/ReadSettings@v5.0
184+
uses: microsoft/AL-Go-Actions/ReadSettings@v5.1
185185
with:
186186
shell: powershell
187187

@@ -190,7 +190,7 @@ jobs:
190190
uses: actions/configure-pages@v5
191191

192192
- name: Build Reference Documentation
193-
uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v5.0
193+
uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v5.1
194194
with:
195195
shell: powershell
196196
artifacts: '.artifacts'
@@ -211,6 +211,9 @@ jobs:
211211
strategy: ${{ fromJson(needs.Initialization.outputs.environmentsMatrixJson) }}
212212
runs-on: ${{ fromJson(matrix.os) }}
213213
name: Deploy to ${{ matrix.environment }}
214+
defaults:
215+
run:
216+
shell: ${{ matrix.shell }}
214217
environment:
215218
name: ${{ matrix.environment }}
216219
url: ${{ steps.Deploy.outputs.environmentUrl }}
@@ -224,9 +227,9 @@ jobs:
224227
path: '.artifacts'
225228

226229
- name: Read settings
227-
uses: microsoft/AL-Go-Actions/ReadSettings@v5.0
230+
uses: microsoft/AL-Go-Actions/ReadSettings@v5.1
228231
with:
229-
shell: powershell
232+
shell: ${{ matrix.shell }}
230233

231234
- name: EnvName
232235
id: envName
@@ -237,19 +240,19 @@ jobs:
237240
238241
- name: Read secrets
239242
id: ReadSecrets
240-
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.0
243+
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1
241244
with:
242-
shell: powershell
245+
shell: ${{ matrix.shell }}
243246
gitHubSecrets: ${{ toJson(secrets) }}
244247
getSecrets: '${{ steps.envName.outputs.envName }}-AuthContext,${{ steps.envName.outputs.envName }}_AuthContext,AuthContext,${{ steps.envName.outputs.envName }}-EnvironmentName,${{ steps.envName.outputs.envName }}_EnvironmentName,EnvironmentName,projects'
245248

246249
- name: Deploy
247250
id: Deploy
248-
uses: microsoft/AL-Go-Actions/Deploy@v5.0
251+
uses: microsoft/AL-Go-Actions/Deploy@v5.1
249252
env:
250253
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
251254
with:
252-
shell: powershell
255+
shell: ${{ matrix.shell }}
253256
environmentName: ${{ matrix.environment }}
254257
artifacts: '.artifacts'
255258
type: 'CD'
@@ -274,20 +277,20 @@ jobs:
274277
path: '.artifacts'
275278

276279
- name: Read settings
277-
uses: microsoft/AL-Go-Actions/ReadSettings@v5.0
280+
uses: microsoft/AL-Go-Actions/ReadSettings@v5.1
278281
with:
279282
shell: powershell
280283

281284
- name: Read secrets
282285
id: ReadSecrets
283-
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.0
286+
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1
284287
with:
285288
shell: powershell
286289
gitHubSecrets: ${{ toJson(secrets) }}
287290
getSecrets: '${{ matrix.deliveryTarget }}Context'
288291

289292
- name: Deliver
290-
uses: microsoft/AL-Go-Actions/Deliver@v5.0
293+
uses: microsoft/AL-Go-Actions/Deliver@v5.1
291294
env:
292295
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
293296
with:
@@ -307,7 +310,7 @@ jobs:
307310

308311
- name: Finalize the workflow
309312
id: PostProcess
310-
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.0
313+
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1
311314
with:
312315
shell: powershell
313316
eventId: "DO0091"

0 commit comments

Comments
 (0)