Skip to content

Commit

Permalink
Add configuration for building 1st party apps (#25265)
Browse files Browse the repository at this point in the history
This PR adds: 

- Updates to the AL-Go-Settings.json file
- Disabled tests 
- A copy of the Builds/Scripts folder from BCApps
- A copy of UpdateGitHubGoSystemFiles and UpdatePackageVersions from
BCApps
- Two AL-Go projects: _Build/projects/1st Party Apps (W1)_ and
_Build/projects/1st Party Apps Tests (W1)_
  • Loading branch information
aholstrup1 authored Nov 22, 2023
1 parent f66bd1c commit 290b58c
Show file tree
Hide file tree
Showing 72 changed files with 1,900 additions and 995 deletions.
33 changes: 23 additions & 10 deletions .github/AL-Go-Settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"runs-on": "windows-latest",
"cacheImageName": "",
"UsePsSession": false,
"artifact": "bcartifacts//23.1.13431.14020/base",
"artifact": "bcartifacts//23.1.13431.14067/base",
"country": "base",
"useProjectDependencies": true,
"repoVersion": "23.1",
Expand All @@ -27,22 +27,35 @@
"CreateRelease.yaml",
"CreateTestApp.yaml",
"Current.yaml",
"IncrementVersionNumber.yaml",
"NextMajor.yaml",
"NextMinor.yaml",
"PublishToEnvironment.yaml"
"PublishToEnvironment.yaml",
"Test Current.settings.json"
],
"buildModes": [
"Default",
"Clean"
"excludeEnvironments": [
"Official-Build"
],
"excludeEnvironments": [
"Official"
"buildModes": [
"Translated"
],
"enableCodeCop": true,
"CICDPushBranches": [
"main"
],
"CICDPullRequestBranches": [
"main"
],
"enableCodeCop": true,
"enableAppSourceCop": true,
"enablePerTenantExtensionCop": true,
"enableUICop": true,
"rulesetFile": "..\\..\\..\\Apps\\rulesets\\app.ruleset.json",
"PullRequestTrigger": "pull_request",
"alwaysBuildAllProjects": true
"skipUpgrade": true,
"fullBuildPatterns": [
"Build/*",
"src/rulesets/*",
".github/workflows/PullRequestHandler.yaml",
".github/workflows/_BuildALGoProject.yaml"
],
"PullRequestTrigger": "pull_request"
}
52 changes: 52 additions & 0 deletions .github/workflows/UpdateBCArtifactVersion.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Update BC Artifact Version

on:
workflow_dispatch:
schedule:
- cron: "55 05 * * 0,2,4" # Run at 05:55 UTC on Sunday, Tuesday, and Thursday

defaults:
run:
shell: powershell

jobs:
GetBranches:
name: Get Branches
runs-on: windows-latest
outputs:
UpdateBranches: ${{ steps.GetBranches.outputs.UpdateBranches }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get Branches
id: GetBranches
run: |
git fetch
$branches = @(git for-each-ref --format="'%(refname:short)'" refs/remotes/origin/release/ | % { $_ -replace 'origin/', '' })
$branches += "'main'"
$branchMatrix = "[$($branches -join ',')]"
Write-Host "Updating branches: $branchMatrix"
Add-Content -Path $env:GITHUB_OUTPUT -Value "UpdateBranches=$branchMatrix"
UpdateBCArtifactVersion:
name: "[${{ matrix.branch }}] Update BC Artifact Version"
environment: Official-Build
runs-on: windows-latest
needs: GetBranches
strategy:
matrix:
branch: ${{ fromJson(needs.GetBranches.outputs.UpdateBranches) }}
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}

- name: Update BC Artifact Version
env:
GH_TOKEN: ${{ secrets.GHTOKENWORKFLOW }}
run: |
build/scripts/UpdateBCArtifactVersion.ps1 -Repository $ENV:GITHUB_REPOSITORY -TargetBranch ${{ matrix.branch }} -Actor $env:GITHUB_ACTOR
36 changes: 30 additions & 6 deletions .github/workflows/UpdatePackageVersions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,44 @@ defaults:
shell: powershell

jobs:
GetBranches:
name: Get Branches
runs-on: windows-latest
outputs:
UpdateBranches: ${{ steps.GetBranches.outputs.UpdateBranches }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get Branches
id: GetBranches
run: |
git fetch
$branches = @(git for-each-ref --format="'%(refname:short)'" refs/remotes/origin/release/ | % { $_ -replace 'origin/', '' })
$branches += "'main'"
$branchMatrix = "[$($branches -join ',')]"
Write-Host "Updating branches: $branchMatrix"
Add-Content -Path $env:GITHUB_OUTPUT -Value "UpdateBranches=$branchMatrix"
UpdatePackageVersions:
if: github.repository_owner == 'microsoft'
name: "[${{ matrix.branch }}] Update Package Versions"
runs-on: windows-latest
environment: Official-Build
needs: GetBranches
strategy:
matrix:
branch: ['main']
branch: ${{ fromJson(needs.GetBranches.outputs.UpdateBranches) }}
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}

- name: Update Package Versions
run: |
Build/Scripts/UpdatePackageVersions.ps1 -TargetBranch ${{ matrix.branch }} -Actor $env:GITHUB_ACTOR
env:
GITHUB_TOKEN: ${{ secrets.GHTOKENWORKFLOW }}
GH_TOKEN: ${{ secrets.GHTOKENWORKFLOW }}
InsiderSASToken: ${{ secrets.INSIDERSASTOKEN }}
run: |
build/scripts/UpdatePackageVersions.ps1 -Repository $ENV:GITHUB_REPOSITORY -TargetBranch ${{ matrix.branch }} -Actor $env:GITHUB_ACTOR
7 changes: 7 additions & 0 deletions Apps/DisabledTests/AMCBankStmtE2EWebServ.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"codeunitId": 135080,
"CodeunitName": "AMC Bank Stmt E2E Web Serv",
"Method": "*"
}
]
7 changes: 7 additions & 0 deletions Apps/DisabledTests/AMCBankingCredentialUT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"codeunitId": 132558,
"CodeunitName": "AMC Banking Credential UT",
"Method": "*"
}
]
7 changes: 7 additions & 0 deletions Apps/DisabledTests/AMCCTE2EWebServiceTest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"codeunitId": 135087,
"CodeunitName": "AMC CT E2E Web Service Test",
"Method": "*"
}
]
Loading

0 comments on commit 290b58c

Please sign in to comment.