Skip to content

Commit

Permalink
Update AL-Go System Files
Browse files Browse the repository at this point in the history
  • Loading branch information
mazhelez committed Feb 13, 2024
1 parent 4ddf8a3 commit ef7a4f7
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 113 deletions.
154 changes: 77 additions & 77 deletions .github/AL-Go-Settings.json
Original file line number Diff line number Diff line change
@@ -1,77 +1,77 @@
{
"type": "PTE",
"templateUrl": "https://github.com/microsoft/AL-Go-PTE@preview",
"bcContainerHelperVersion": "preview",
"runs-on": "windows-latest",
"cacheImageName": "",
"UsePsSession": false,
"artifact": "https://bcinsider.azureedge.net/sandbox/24.0.16163.0/base",
"country": "base",
"useProjectDependencies": true,
"repoVersion": "24.0",
"cleanModePreprocessorSymbols": [
"CLEAN17",
"CLEAN18",
"CLEAN19",
"CLEAN20",
"CLEAN21",
"CLEAN22",
"CLEAN23",
"CLEAN24"
],
"unusedALGoSystemFiles": [
"AddExistingAppOrTestApp.yaml",
"CreateApp.yaml",
"CreateOnlineDevelopmentEnvironment.yaml",
"CreatePerformanceTestApp.yaml",
"CreateRelease.yaml",
"CreateTestApp.yaml",
"Current.yaml",
"IncrementVersionNumber.yaml",
"NextMajor.yaml",
"NextMinor.yaml",
"PublishToEnvironment.yaml",
"Test Current.settings.json"
],
"excludeEnvironments": [
"Official-Build"
],
"buildModes": [
"Default",
"Clean"
],
"CICDPushBranches": [
"main",
"releases/*"
],
"CICDPullRequestBranches": [
"main",
"releases/*",
"features/*"
],
"enableCodeCop": true,
"enableAppSourceCop": true,
"enablePerTenantExtensionCop": true,
"enableUICop": true,
"enableCodeAnalyzersOnTestApps": true,
"rulesetFile": "..\\..\\..\\src\\rulesets\\ruleset.json",
"skipUpgrade": true,
"PartnerTelemetryConnectionString": "InstrumentationKey=403ba4d3-ad2b-4ca1-8602-b7746de4c048;IngestionEndpoint=https://swedencentral-0.in.applicationinsights.azure.com/",
"fullBuildPatterns": [
"build/*",
"src/rulesets/*",
".github/workflows/PullRequestHandler.yaml",
".github/workflows/_BuildALGoProject.yaml"
],
"PullRequestTrigger": "pull_request",
"ALDoc": {
"maxReleases": 0,
"continuousDeployment": true,
"groupByProject": false,
"excludeProjects": [
"build_projects_System Application Modules"
]
},
"UpdateALGoSystemFilesEnvironment": "Official-Build",
"templateSha": "0476547896ebcd3ba5455b3e0e59b48c0d4a26ca"
}
{
"type": "PTE",
"templateUrl": "https://github.com/microsoft/AL-Go-PTE@preview",
"bcContainerHelperVersion": "preview",
"runs-on": "windows-latest",
"cacheImageName": "",
"UsePsSession": false,
"artifact": "https://bcinsider.azureedge.net/sandbox/24.0.16163.0/base",
"country": "base",
"useProjectDependencies": true,
"repoVersion": "24.0",
"cleanModePreprocessorSymbols": [
"CLEAN17",
"CLEAN18",
"CLEAN19",
"CLEAN20",
"CLEAN21",
"CLEAN22",
"CLEAN23",
"CLEAN24"
],
"unusedALGoSystemFiles": [
"AddExistingAppOrTestApp.yaml",
"CreateApp.yaml",
"CreateOnlineDevelopmentEnvironment.yaml",
"CreatePerformanceTestApp.yaml",
"CreateRelease.yaml",
"CreateTestApp.yaml",
"Current.yaml",
"IncrementVersionNumber.yaml",
"NextMajor.yaml",
"NextMinor.yaml",
"PublishToEnvironment.yaml",
"Test Current.settings.json"
],
"excludeEnvironments": [
"Official-Build"
],
"buildModes": [
"Default",
"Clean"
],
"CICDPushBranches": [
"main",
"releases/*"
],
"CICDPullRequestBranches": [
"main",
"releases/*",
"features/*"
],
"enableCodeCop": true,
"enableAppSourceCop": true,
"enablePerTenantExtensionCop": true,
"enableUICop": true,
"enableCodeAnalyzersOnTestApps": true,
"rulesetFile": "..\\..\\..\\src\\rulesets\\ruleset.json",
"skipUpgrade": true,
"PartnerTelemetryConnectionString": "InstrumentationKey=403ba4d3-ad2b-4ca1-8602-b7746de4c048;IngestionEndpoint=https://swedencentral-0.in.applicationinsights.azure.com/",
"fullBuildPatterns": [
"build/*",
"src/rulesets/*",
".github/workflows/PullRequestHandler.yaml",
".github/workflows/_BuildALGoProject.yaml"
],
"PullRequestTrigger": "pull_request",
"ALDoc": {
"maxReleases": 0,
"continuousDeployment": true,
"groupByProject": false,
"excludeProjects": [
"build_projects_System Application Modules"
]
},
"UpdateALGoSystemFilesEnvironment": "Official-Build",
"templateSha": "0476547896ebcd3ba5455b3e0e59b48c0d4a26ca"
}
2 changes: 1 addition & 1 deletion .github/workflows/UpdateGitHubGoSystemFiles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ env:
jobs:
UpdateALGoSystemFiles:
needs: [ ]
runs-on: [ windows-latest ]
environment: Official-Build
runs-on: [ windows-latest ]
steps:
- name: Dump Workflow Information
uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@4c5bfbca1adebbf997f63882df4b9074a19aac1d
Expand Down
35 changes: 19 additions & 16 deletions build/projects/Business Foundation/.AL-Go/cloudDevEnv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,6 @@ Param(
$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0

try {
$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
Write-Host "Downloading GitHub Helper module"
$GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1"
$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/54737c26ba5d1c8b647c089a372d9cd2cd907365/Actions/Github-Helper.psm1', $GitHubHelperPath)
Write-Host "Downloading AL-Go Helper script"
$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1"
$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/54737c26ba5d1c8b647c089a372d9cd2cd907365/Actions/AL-Go-Helper.ps1', $ALGoHelperPath)

Import-Module $GitHubHelperPath
. $ALGoHelperPath -local

$baseFolder = GetBaseFolder -folder $PSScriptRoot
$project = GetProject -baseFolder $baseFolder -projectALGoFolder $PSScriptRoot

Clear-Host
Write-Host
Write-Host -ForegroundColor Yellow @'
Expand All @@ -40,7 +24,26 @@ 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/4c5bfbca1adebbf997f63882df4b9074a19aac1d/Actions/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/4c5bfbca1adebbf997f63882df4b9074a19aac1d/Actions/AL-Go-Helper.ps1'
Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl"
$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1"
$webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath)

Import-Module $GitHubHelperPath
. $ALGoHelperPath -local

$baseFolder = GetBaseFolder -folder $PSScriptRoot
$project = GetProject -baseFolder $baseFolder -projectALGoFolder $PSScriptRoot

Write-Host @'
This script will create a cloud based development environment (Business Central SaaS Sandbox) for your project.
All apps and test apps will be compiled and published to the environment in the development scope.
The script will also modify launch.json to have a "Cloud Sandbox (<name>)" configuration point to your environment.
Expand Down
43 changes: 24 additions & 19 deletions build/projects/Business Foundation/.AL-Go/localDevEnv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,13 @@ Param(
[string] $auth = "",
[pscredential] $credential = $null,
[string] $licenseFileUrl = "",
[switch] $fromVSCode
[switch] $fromVSCode,
[switch] $accept_insiderEula
)

$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0

try {
$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
Write-Host "Downloading GitHub Helper module"
$GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1"
$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/54737c26ba5d1c8b647c089a372d9cd2cd907365/Actions/Github-Helper.psm1', $GitHubHelperPath)
Write-Host "Downloading AL-Go Helper script"
$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1"
$webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/54737c26ba5d1c8b647c089a372d9cd2cd907365/Actions/AL-Go-Helper.ps1', $ALGoHelperPath)

Import-Module $GitHubHelperPath
. $ALGoHelperPath -local

$baseFolder = GetBaseFolder -folder $PSScriptRoot
$project = GetProject -baseFolder $baseFolder -projectALGoFolder $PSScriptRoot

Clear-Host
Write-Host
Write-Host -ForegroundColor Yellow @'
Expand All @@ -42,7 +27,26 @@ 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/4c5bfbca1adebbf997f63882df4b9074a19aac1d/Actions/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/4c5bfbca1adebbf997f63882df4b9074a19aac1d/Actions/AL-Go-Helper.ps1'
Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl"
$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1"
$webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath)

Import-Module $GitHubHelperPath
. $ALGoHelperPath -local

$baseFolder = GetBaseFolder -folder $PSScriptRoot
$project = GetProject -baseFolder $baseFolder -projectALGoFolder $PSScriptRoot

Write-Host @'
This script will create a docker based local development environment for your project.
NOTE: You need to have Docker installed, configured and be able to create Business Central containers for this to work.
Expand All @@ -53,7 +57,7 @@ The script will also modify launch.json to have a Local Sandbox configuration po
'@

$settings = ReadSettings -baseFolder $baseFolder -project $project -userName $env:USERNAME
$settings = ReadSettings -baseFolder $baseFolder -project $project -userName $env:USERNAME -workflowName 'localDevEnv'

Write-Host "Checking System Requirements"
$dockerProcess = (Get-Process "dockerd" -ErrorAction Ignore)
Expand Down Expand Up @@ -129,7 +133,8 @@ CreateDevEnv `
-project $project `
-auth $auth `
-credential $credential `
-licenseFileUrl $licenseFileUrl
-licenseFileUrl $licenseFileUrl `
-accept_insiderEula:$accept_insiderEula
}
catch {
Write-Host -ForegroundColor Red "Error: $($_.Exception.Message)`nStacktrace: $($_.scriptStackTrace)"
Expand Down

0 comments on commit ef7a4f7

Please sign in to comment.