Skip to content

Commit

Permalink
Merge pull request #532 from freddydk/appdependency
Browse files Browse the repository at this point in the history
ApplicationDependency is not calculated
  • Loading branch information
freddydk committed May 13, 2023
2 parents fb20f04 + 87dd3b7 commit 9bc864a
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Actions/AL-Go-Helper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,8 @@ function AnalyzeRepo {
Param(
[hashTable] $settings,
$token,
[string] $baseFolder,
[string] $project,
[string] $baseFolder = $ENV:GITHUB_WORKSPACE,
[string] $project = '.',
[string] $insiderSasToken,
[switch] $doNotCheckArtifactSetting,
[switch] $doNotIssueWarnings,
Expand Down
9 changes: 6 additions & 3 deletions Actions/DetermineArtifactUrl/DetermineArtifactUrl.Action.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Param(
[Parameter(HelpMessage = "Specifies the parent telemetry scope for the telemetry signal", Mandatory = $false)]
[string] $parentTelemetryScopeJson = '7b7d',
[Parameter(HelpMessage = "Project folder", Mandatory = $false)]
[string] $project = ".",
[Parameter(HelpMessage = "Settings from repository in compressed Json format", Mandatory = $false)]
[string] $settingsJson = '{"artifact":""}',
[Parameter(HelpMessage = "Secrets from repository in compressed Json format", Mandatory = $false)]
[string] $secretsJson = '{"insiderSasToken":""}',
[Parameter(HelpMessage = "Specifies the parent telemetry scope for the telemetry signal", Mandatory = $false)]
[string] $parentTelemetryScopeJson = '7b7d'
[string] $secretsJson = '{"insiderSasToken":""}'
)

$ErrorActionPreference = "Stop"
Expand All @@ -26,6 +28,7 @@ try {
$secrets = $secretsJson | ConvertFrom-Json | ConvertTo-HashTable
$insiderSasToken = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($secrets.insiderSasToken))
$projectSettings = $settingsJson | ConvertFrom-Json | ConvertTo-HashTable
$projectSettings = AnalyzeRepo -settings $projectSettings -project $project -doNotCheckArtifactSetting -doNotIssueWarnings
$artifactUrl = Determine-ArtifactUrl -projectSettings $projectSettings -insiderSasToken $insiderSasToken
$projectSettings.artifact = $artifactUrl
#endregion
Expand Down
7 changes: 6 additions & 1 deletion Actions/DetermineArtifactUrl/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: Specifies the parent telemetry scope for the telemetry signal
required: false
default: '7b7d'
project:
description: Project folder
required: false
default: '.'
settingsJson:
description: Settings from repository in compressed Json format
required: false
Expand All @@ -29,10 +33,11 @@ runs:
id: determineArtifactUrl
env:
_parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }}
_project: ${{ inputs.project }}
_settingsJson: ${{ inputs.settingsJson }}
_secretsJson: ${{ inputs.secretsJson }}
run: try {
${{ github.action_path }}/DetermineArtifactUrl.Action.ps1 -parentTelemetryScopeJson $env:_parentTelemetryScopeJson -settingsJson $ENV:_settingsJson -secretsJson $ENV:_secretsJson
${{ github.action_path }}/DetermineArtifactUrl.Action.ps1 -parentTelemetryScopeJson $env:_parentTelemetryScopeJson -project $ENV:_project -settingsJson $ENV:_settingsJson -secretsJson $ENV:_secretsJson
} catch { Write-Host "::Error::Unexpected error when running action ($($_.Exception.Message.Replace("`r",'').Replace("`n",' ')))"; exit 1 }
branding:
icon: terminal
Expand Down
1 change: 1 addition & 0 deletions Templates/AppSource App/.github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ jobs:
with:
shell: ${{ needs.Initialization.outputs.githubRunnerShell }}
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }}
project: ${{ matrix.project }}
settingsJson: ${{ env.Settings }}
secretsJson: ${{ env.RepoSecrets }}

Expand Down
1 change: 1 addition & 0 deletions Templates/AppSource App/.github/workflows/Current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
with:
shell: ${{ needs.Initialization.outputs.githubRunnerShell }}
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }}
project: ${{ matrix.project }}
settingsJson: ${{ env.Settings }}
secretsJson: ${{ env.RepoSecrets }}

Expand Down
1 change: 1 addition & 0 deletions Templates/AppSource App/.github/workflows/NextMajor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
with:
shell: ${{ needs.Initialization.outputs.githubRunnerShell }}
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }}
project: ${{ matrix.project }}
settingsJson: ${{ env.Settings }}
secretsJson: ${{ env.RepoSecrets }}

Expand Down
1 change: 1 addition & 0 deletions Templates/AppSource App/.github/workflows/NextMinor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
with:
shell: ${{ needs.Initialization.outputs.githubRunnerShell }}
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }}
project: ${{ matrix.project }}
settingsJson: ${{ env.Settings }}
secretsJson: ${{ env.RepoSecrets }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ jobs:
with:
shell: ${{ needs.Initialization.outputs.githubRunnerShell }}
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }}
project: ${{ matrix.project }}
settingsJson: ${{ env.Settings }}
secretsJson: ${{ env.RepoSecrets }}

Expand Down
1 change: 1 addition & 0 deletions Templates/Per Tenant Extension/.github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ jobs:
with:
shell: ${{ needs.Initialization.outputs.githubRunnerShell }}
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }}
project: ${{ matrix.project }}
settingsJson: ${{ env.Settings }}
secretsJson: ${{ env.RepoSecrets }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
with:
shell: ${{ needs.Initialization.outputs.githubRunnerShell }}
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }}
project: ${{ matrix.project }}
settingsJson: ${{ env.Settings }}
secretsJson: ${{ env.RepoSecrets }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
with:
shell: ${{ needs.Initialization.outputs.githubRunnerShell }}
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }}
project: ${{ matrix.project }}
settingsJson: ${{ env.Settings }}
secretsJson: ${{ env.RepoSecrets }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
with:
shell: ${{ needs.Initialization.outputs.githubRunnerShell }}
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }}
project: ${{ matrix.project }}
settingsJson: ${{ env.Settings }}
secretsJson: ${{ env.RepoSecrets }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ jobs:
with:
shell: ${{ needs.Initialization.outputs.githubRunnerShell }}
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }}
project: ${{ matrix.project }}
settingsJson: ${{ env.Settings }}
secretsJson: ${{ env.RepoSecrets }}

Expand Down

0 comments on commit 9bc864a

Please sign in to comment.