Skip to content

Commit

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

Deploying AL-Go from main (a2c4efcc730e9b264f74cb321e7c2193c8c96b8d) to
main

Co-authored-by: microsoft <[email protected]>
  • Loading branch information
bcbuild-github-agent and microsoft authored Aug 21, 2024
1 parent 81cff3d commit 72f3223
Show file tree
Hide file tree
Showing 25 changed files with 538 additions and 347 deletions.
31 changes: 20 additions & 11 deletions .AL-Go/cloudDevEnv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ Param(

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

function DownloadHelperFile {
param(
[string] $url,
[string] $folder
)

$prevProgressPreference = $ProgressPreference; $ProgressPreference = 'SilentlyContinue'
$name = [System.IO.Path]::GetFileName($url)
Write-Host "Downloading $name from $url"
$path = Join-Path $folder $name
Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path
$ProgressPreference = $prevProgressPreference
return $path
}

try {
Clear-Host
Write-Host
Expand All @@ -25,17 +40,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.2/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.2/AL-Go-Helper.ps1'
Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl"
$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1"
$webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath)
$tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())"
New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null
$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.3/Github-Helper.psm1' -folder $tmpFolder
$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.3/AL-Go-Helper.ps1' -folder $tmpFolder
DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.3/Packages.json' -folder $tmpFolder | Out-Null

Import-Module $GitHubHelperPath
. $ALGoHelperPath -local
Expand Down
31 changes: 20 additions & 11 deletions .AL-Go/localDevEnv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ Param(

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

function DownloadHelperFile {
param(
[string] $url,
[string] $folder
)

$prevProgressPreference = $ProgressPreference; $ProgressPreference = 'SilentlyContinue'
$name = [System.IO.Path]::GetFileName($url)
Write-Host "Downloading $name from $url"
$path = Join-Path $folder $name
Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path
$ProgressPreference = $prevProgressPreference
return $path
}

try {
Clear-Host
Write-Host
Expand All @@ -29,17 +44,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.2/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.2/AL-Go-Helper.ps1'
Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl"
$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1"
$webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath)
$tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())"
New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null
$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.3/Github-Helper.psm1' -folder $tmpFolder
$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.3/AL-Go-Helper.ps1' -folder $tmpFolder
DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.3/Packages.json' -folder $tmpFolder | Out-Null

Import-Module $GitHubHelperPath
. $ALGoHelperPath -local
Expand Down
180 changes: 157 additions & 23 deletions .github/RELEASENOTES.copy.md

Large diffs are not rendered by default.

22 changes: 12 additions & 10 deletions .github/workflows/AddExistingAppOrTestApp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ on:
default: false

permissions:
actions: read
contents: write
id-token: write
pull-requests: write

defaults:
Expand All @@ -39,48 +41,48 @@ jobs:
runs-on: [ windows-latest ]
steps:
- name: Dump Workflow Information
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.3
with:
shell: powershell

- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

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

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

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

- name: Add existing app
uses: microsoft/AL-Go-Actions/AddExistingApp@v5.2
uses: microsoft/AL-Go-Actions/AddExistingApp@v5.3
with:
shell: powershell
token: ${{ steps.ReadSecrets.outputs.TokenForPush }}
parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }}
project: ${{ github.event.inputs.project }}
url: ${{ github.event.inputs.url }}
directCommit: ${{ github.event.inputs.directCommit }}

- name: Finalize the workflow
if: always()
uses: microsoft/AL-Go-Actions/[email protected]
uses: microsoft/AL-Go-Actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
shell: powershell
eventId: "DO0090"
telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }}
currentJobContext: ${{ toJson(job) }}
Loading

0 comments on commit 72f3223

Please sign in to comment.