Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
freddydk committed Aug 3, 2023
1 parent b9fb95b commit 87051c3
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 36 deletions.
1 change: 0 additions & 1 deletion Actions/CalculateArtifactNames/CalculateArtifactNames.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ function Set-EnvVariable([string] $name, [string] $value) {

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

Write-Host $env:Settings
$settings = $env:Settings | ConvertFrom-Json

if ($project -eq ".") {
Expand Down
5 changes: 0 additions & 5 deletions Actions/CalculateArtifactNames/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ inputs:
description: Suffix to add to the artifacts names
required: false
default: ''
settingsJson:
description: 'OBSOLETE: Settings from repository in compressed Json format'
required: false
outputs:
ThisBuildAppsArtifactsName:
description: Artifact name for apps being built in the current workflow run
Expand Down Expand Up @@ -63,9 +60,7 @@ runs:
_buildMode: ${{ inputs.buildMode }}
_branchName: ${{ inputs.branchName }}
_suffix: ${{ inputs.suffix }}
_settingsJson: ${{ inputs.settingsJson }}
run: |
if ($ENV:_settingsJson) { Write-Host "::Warning::Running on old AL-Go for GitHub system files. Please Update ASAP." }
try { ${{ github.action_path }}/CalculateArtifactNames.ps1 -project $ENV:_project -buildMode $ENV:_buildMode -branchName $ENV:_branchName -suffix $ENV:_suffix } catch { Write-Host "::Error::Unexpected error when running action ($($_.Exception.Message.Replace("*",'').Replace("*",' ')))"; exit 1 }
branding:
icon: terminal
Expand Down
5 changes: 0 additions & 5 deletions Actions/DetermineArtifactUrl/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ inputs:
description: Secrets from repository in compressed Json format
required: false
default: '{"insiderSasToken":""}'
settingsJson:
description: 'OBSOLETE: Settings from repository in compressed Json format'
required: false
runs:
using: composite
steps:
Expand All @@ -29,9 +26,7 @@ runs:
_parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }}
_project: ${{ inputs.project }}
_secretsJson: ${{ inputs.secretsJson }}
_settingsJson: ${{ inputs.settingsJson }}
run: |
if ($ENV:_settingsJson) { Write-Host "::Warning::Running on old AL-Go for GitHub system files. Please Update ASAP." }
try { ${{ github.action_path }}/DetermineArtifactUrl.ps1 -parentTelemetryScopeJson $env:_parentTelemetryScopeJson -project $ENV:_project -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
5 changes: 0 additions & 5 deletions Actions/ReadSecrets/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ inputs:
description: Specifies the parent telemetry scope for the telemetry signal
required: false
default: '7b7d'
settingsJson:
description: 'OBSOLETE: Settings from repository in compressed Json format'
required: false
runs:
using: composite
steps:
Expand All @@ -23,9 +20,7 @@ runs:
env:
_secrets: ${{ inputs.secrets }}
_parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }}
_settingsJson: ${{ inputs.settingsJson }}
run: |
if ($ENV:_settingsJson) { Write-Host "::Warning::Running on old AL-Go for GitHub system files. Please Update ASAP." }
try { ${{ github.action_path }}/ReadSecrets.ps1 -secrets $ENV:_secrets -parentTelemetryScopeJson $ENV:_parentTelemetryScopeJson } catch { Write-Host "::Error::Unexpected error when running action ($($_.Exception.Message.Replace("`r",'').Replace("`n",' ')))"; exit 1 }
branding:
icon: terminal
Expand Down
5 changes: 0 additions & 5 deletions Actions/RunPipeline/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ inputs:
description: A JSON-formatted list of test apps to install
required: false
default: '[]'
settingsJson:
description: 'OBSOLETE: Settings from repository in compressed Json format'
required: false
runs:
using: composite
steps:
Expand All @@ -54,9 +51,7 @@ runs:
_buildMode: ${{ inputs.buildMode }}
_installAppsJson: ${{ inputs.installAppsJson }}
_installTestAppsJson: ${{ inputs.installTestAppsJson }}
_settingsJson: ${{ inputs.settingsJson }}
run: |
if ($ENV:_settingsJson) { Write-Host "::Warning::Running on old AL-Go for GitHub system files. Please Update ASAP." }
try { ${{ github.action_path }}/RunPipeline.ps1 -actor $ENV:_actor -token $ENV:_token -parentTelemetryScopeJson $ENV:_parentTelemetryScopeJson -project $ENV:_project -secretsJson $ENV:_secretsJson -buildMode $ENV:_buildMode -installAppsJson $ENV:_installAppsJson -installTestAppsJson $ENV:_installTestAppsJson } catch { Write-Host "::Error::Unexpected error when running action ($($_.Exception.Message.Replace("`r",'').Replace("`n",' ')))"; exit 1 }
branding:
icon: terminal
Expand Down
5 changes: 0 additions & 5 deletions Actions/Sign/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ inputs:
description: Specifies the parent telemetry scope for the telemetry signal
required: false
default: '7b7d'
settingsJson:
description: 'OBSOLETE: Settings from repository in compressed Json format'
required: true
runs:
using: composite
steps:
Expand All @@ -37,10 +34,8 @@ runs:
_digestAlgorithm: ${{ inputs.digestAlgorithm }}
_pathToFiles: ${{ inputs.pathToFiles }}
_parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }}
_settingsJson: ${{ inputs.settingsJson }}
id: Sign
run: |
if ($ENV:_settingsJson) { Write-Host "::Warning::Running on old AL-Go for GitHub system files. Please Update ASAP." }
try {
${{ github.action_path }}/Sign.ps1 -AzureCredentialsJson $ENV:_azureCredentialsJson `
-TimestampService $ENV:_timestampService `
Expand Down
10 changes: 0 additions & 10 deletions Tests/TestActionsHelper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,6 @@ function YamlTest {
}
}
}
if (@('CalculateArtifactNames','DetermineArtifactUrl','ReadSecrets','RunPipeline','Sign') -contains $actionName) {
# settingsJson is a special case. It will no longer be a parameter, but an environment variable
# Actions can use $env:Settings to get to the settings in json format
$yaml.AppendLine(" SettingsJson:") | Out-Null
$yaml.AppendLine(" description: 'OBSOLETE: Settings from repository in compressed Json format'") | Out-Null
$yaml.AppendLine(" required: false") | Out-Null
$envLines.AppendLine(" _SettingsJson: `${{ inputs.SettingsJson }}")
# Add a warning to the action that it is using an old version of AL-Go for GitHub
$warningLines += @('if ($ENV:_settingsJson) { Write-Host "::Warning::Running on old AL-Go for GitHub system files. Please Update ASAP." }')
}
if ($outputs -and $outputs.Count -gt 0) {
$yaml.AppendLine("outputs:") | Out-Null
$outputs.Keys | ForEach-Object {
Expand Down

0 comments on commit 87051c3

Please sign in to comment.