Skip to content

Commit

Permalink
Merge pull request #131 from freddydk/nwsysuxh.11a
Browse files Browse the repository at this point in the history
'Collect changes from freddydk/*@main'
  • Loading branch information
freddydk committed Dec 21, 2022
2 parents 777f004 + 5b33155 commit ce7ae89
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 52 deletions.
6 changes: 4 additions & 2 deletions Actions/AL-Go-Helper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Param(
[switch] $local
)

$gitHubHelperPath = Join-Path $PSScriptRoot 'GitHub-Helper.psm1'
$gitHubHelperPath = Join-Path $PSScriptRoot 'Github-Helper.psm1'
if (Test-Path $gitHubHelperPath) {
Import-Module $gitHubHelperPath
}
Expand Down Expand Up @@ -227,12 +227,14 @@ function DownloadAndImportBcContainerHelper {
$params += @{ "bcContainerHelperConfigFile" = $repoSettingsPath }
}
}
Write-Host $bcContainerHelperVersion
if ($bcContainerHelperVersion -eq "") {
$bcContainerHelperVersion = "latest"
}
elseif ($bcContainerHelperVersion -eq "private") {
# Using a private BcContainerHelper version grabs a fork of BcContainerHelper with the same owner as the AL-Go actions
$owner = "$ENV:GITHUB_ACTION_REPOSITORY".Split('/')[0]
$ActionsRepo = "microsoft/AL-Go-Actions@main"
$owner = $actionsRepo.Split('/')[0]
$bcContainerHelperVersion = "https://github.com/$owner/navcontainerhelper/archive/master.zip"
}

Expand Down
2 changes: 1 addition & 1 deletion Actions/CreateReleaseNotes/CreateReleaseNotes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ try {

$releaseNotes = ""

Import-Module (Join-Path $PSScriptRoot '..\GitHub-Helper.psm1' -Resolve)
Import-Module (Join-Path $PSScriptRoot '..\Github-Helper.psm1' -Resolve)

SemVerStrToSemVerObj -semVerStr $tag_name | Out-Null

Expand Down
50 changes: 26 additions & 24 deletions Templates/AppSource App/.github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -469,24 +469,6 @@ jobs:
SecretsJson: ${{ env.RepoSecrets }}
buildMode: ${{ matrix.buildMode }}

- name: Upload thisbuild artifacts - apps
if: env.workflowDepth > 1
uses: actions/upload-artifact@v3
with:
name: 'thisbuild-${{ matrix.project }}-${{ matrix.buildMode }}Apps'
path: '${{ matrix.project }}/.buildartifacts/Apps/'
if-no-files-found: ignore
retention-days: 1

- name: Upload thisbuild artifacts - test apps
if: env.workflowDepth > 1
uses: actions/upload-artifact@v3
with:
name: 'thisbuild-${{ matrix.project }}-${{ matrix.buildMode }}TestApps'
path: '${{ matrix.project }}/.buildartifacts/TestApps/'
if-no-files-found: ignore
retention-days: 1

- name: Calculate Artifact names
id: calculateArtifactNames
if: success() || failure()
Expand All @@ -513,36 +495,56 @@ jobs:
Add-Content -Path $env:GITHUB_OUTPUT -Value "$name=$value"
Add-Content -Path $env:GITHUB_ENV -Value "$name=$value"
}
Add-Content -Path $env:GITHUB_OUTPUT -Value "BuildMode=$buildMode"
Add-Content -Path $env:GITHUB_ENV -Value "BuildMode=$buildMode"
- name: Upload thisbuild artifacts - apps
if: env.workflowDepth > 1
uses: actions/upload-artifact@v3
with:
name: 'thisbuild-${{ matrix.project }}-${{ env.BuildMode }}Apps'
path: '${{ matrix.project }}/.buildartifacts/Apps/'
if-no-files-found: ignore
retention-days: 1

- name: Upload thisbuild artifacts - test apps
if: env.workflowDepth > 1
uses: actions/upload-artifact@v3
with:
name: 'thisbuild-${{ matrix.project }}-${{ env.BuildMode }}TestApps'
path: '${{ matrix.project }}/.buildartifacts/TestApps/'
if-no-files-found: ignore
retention-days: 1

- name: Publish artifacts - apps
uses: actions/upload-artifact@v3
if: github.ref_name == 'main' || startswith(github.ref_name, 'release/') || needs.Initialization.outputs.deliveryTargetCount > 0 || needs.Initialization.outputs.environmentCount > 0
with:
name: ${{ env.appsArtifactsName }}
name: ${{ env.AppsArtifactsName }}
path: '${{ matrix.project }}/.buildartifacts/Apps/'
if-no-files-found: ignore

- name: Publish artifacts - dependencies
uses: actions/upload-artifact@v3
if: github.ref_name == 'main' || startswith(github.ref_name, 'release/') || needs.Initialization.outputs.deliveryTargetCount > 0 || needs.Initialization.outputs.environmentCount > 0
with:
name: ${{ env.dependenciesArtifactsName }}
name: ${{ env.DependenciesArtifactsName }}
path: '${{ matrix.project }}/.buildartifacts/Dependencies/'
if-no-files-found: ignore

- name: Publish artifacts - test apps
uses: actions/upload-artifact@v3
if: github.ref_name == 'main' || startswith(github.ref_name, 'release/') || needs.Initialization.outputs.deliveryTargetCount > 0 || needs.Initialization.outputs.environmentCount > 0
with:
name: ${{ env.testAppsArtifactsName }}
name: ${{ env.TestAppsArtifactsName }}
path: '${{ matrix.project }}/.buildartifacts/TestApps/'
if-no-files-found: ignore

- name: Publish artifacts - build output
uses: actions/upload-artifact@v3
if: (success() || failure()) && (hashFiles(format('{0}/BuildOutput.txt',matrix.project)) != '')
with:
name: ${{ env.buildOutputArtifactsName }}
name: ${{ env.BuildOutputArtifactsName }}
path: '${{ matrix.project }}/BuildOutput.txt'
if-no-files-found: ignore

Expand All @@ -558,15 +560,15 @@ jobs:
uses: actions/upload-artifact@v3
if: (success() || failure()) && (hashFiles(format('{0}/TestResults.xml',matrix.project)) != '')
with:
name: ${{ env.testResultsArtifactsName }}
name: ${{ env.TestResultsArtifactsName }}
path: '${{ matrix.project }}/TestResults.xml'
if-no-files-found: ignore

- name: Publish artifacts - bcpt test results
uses: actions/upload-artifact@v3
if: (success() || failure()) && (hashFiles(format('{0}/bcptTestResults.json',matrix.project)) != '')
with:
name: ${{ env.bcptTestResultsArtifactsName }}
name: ${{ env.BcptTestResultsArtifactsName }}
path: '${{ matrix.project }}/bcptTestResults.json'
if-no-files-found: ignore

Expand Down
52 changes: 27 additions & 25 deletions Templates/Per Tenant Extension/.github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
projectDependenciesJson: ${{ steps.ReadSettings.outputs.ProjectDependenciesJson }}
buildOrderJson: ${{ steps.ReadSettings.outputs.BuildOrderJson }}
buildOrderDepth: ${{ steps.ReadSettings.outputs.BuildOrderDepth }}
buildModes: ${{ steps.ReadSettings.outputs.buildModes}}
buildModes: ${{ steps.ReadSettings.outputs.BuildModes }}
steps:
- name: Create CI/CD Workflow Check Run
id: CreateCheckRun
Expand Down Expand Up @@ -469,24 +469,6 @@ jobs:
SecretsJson: ${{ env.RepoSecrets }}
buildMode: ${{ matrix.buildMode }}

- name: Upload thisbuild artifacts - apps
if: env.workflowDepth > 1
uses: actions/upload-artifact@v3
with:
name: 'thisbuild-${{ matrix.project }}-${{ matrix.buildMode }}Apps'
path: '${{ matrix.project }}/.buildartifacts/Apps/'
if-no-files-found: ignore
retention-days: 1

- name: Upload thisbuild artifacts - test apps
if: env.workflowDepth > 1
uses: actions/upload-artifact@v3
with:
name: 'thisbuild-${{ matrix.project }}-${{ matrix.buildMode }}TestApps'
path: '${{ matrix.project }}/.buildartifacts/TestApps/'
if-no-files-found: ignore
retention-days: 1

- name: Calculate Artifact names
id: calculateArtifactNames
if: success() || failure()
Expand All @@ -513,36 +495,56 @@ jobs:
Add-Content -Path $env:GITHUB_OUTPUT -Value "$name=$value"
Add-Content -Path $env:GITHUB_ENV -Value "$name=$value"
}
Add-Content -Path $env:GITHUB_OUTPUT -Value "BuildMode=$buildMode"
Add-Content -Path $env:GITHUB_ENV -Value "BuildMode=$buildMode"
- name: Upload thisbuild artifacts - apps
if: env.workflowDepth > 1
uses: actions/upload-artifact@v3
with:
name: 'thisbuild-${{ matrix.project }}-${{ env.BuildMode }}Apps'
path: '${{ matrix.project }}/.buildartifacts/Apps/'
if-no-files-found: ignore
retention-days: 1

- name: Upload thisbuild artifacts - test apps
if: env.workflowDepth > 1
uses: actions/upload-artifact@v3
with:
name: 'thisbuild-${{ matrix.project }}-${{ env.BuildMode }}TestApps'
path: '${{ matrix.project }}/.buildartifacts/TestApps/'
if-no-files-found: ignore
retention-days: 1

- name: Publish artifacts - apps
uses: actions/upload-artifact@v3
if: github.ref_name == 'main' || startswith(github.ref_name, 'release/') || needs.Initialization.outputs.deliveryTargetCount > 0 || needs.Initialization.outputs.environmentCount > 0
with:
name: ${{ env.appsArtifactsName }}
name: ${{ env.AppsArtifactsName }}
path: '${{ matrix.project }}/.buildartifacts/Apps/'
if-no-files-found: ignore

- name: Publish artifacts - dependencies
uses: actions/upload-artifact@v3
if: github.ref_name == 'main' || startswith(github.ref_name, 'release/') || needs.Initialization.outputs.deliveryTargetCount > 0 || needs.Initialization.outputs.environmentCount > 0
with:
name: ${{ env.dependenciesArtifactsName }}
name: ${{ env.DependenciesArtifactsName }}
path: '${{ matrix.project }}/.buildartifacts/Dependencies/'
if-no-files-found: ignore

- name: Publish artifacts - test apps
uses: actions/upload-artifact@v3
if: github.ref_name == 'main' || startswith(github.ref_name, 'release/') || needs.Initialization.outputs.deliveryTargetCount > 0 || needs.Initialization.outputs.environmentCount > 0
with:
name: ${{ env.testAppsArtifactsName }}
name: ${{ env.TestAppsArtifactsName }}
path: '${{ matrix.project }}/.buildartifacts/TestApps/'
if-no-files-found: ignore

- name: Publish artifacts - build output
uses: actions/upload-artifact@v3
if: (success() || failure()) && (hashFiles(format('{0}/BuildOutput.txt',matrix.project)) != '')
with:
name: ${{ env.buildOutputArtifactsName }}
name: ${{ env.BuildOutputArtifactsName }}
path: '${{ matrix.project }}/BuildOutput.txt'
if-no-files-found: ignore

Expand All @@ -558,15 +560,15 @@ jobs:
uses: actions/upload-artifact@v3
if: (success() || failure()) && (hashFiles(format('{0}/TestResults.xml',matrix.project)) != '')
with:
name: ${{ env.testResultsArtifactsName }}
name: ${{ env.TestResultsArtifactsName }}
path: '${{ matrix.project }}/TestResults.xml'
if-no-files-found: ignore

- name: Publish artifacts - bcpt test results
uses: actions/upload-artifact@v3
if: (success() || failure()) && (hashFiles(format('{0}/bcptTestResults.json',matrix.project)) != '')
with:
name: ${{ env.bcptTestResultsArtifactsName }}
name: ${{ env.BcptTestResultsArtifactsName }}
path: '${{ matrix.project }}/bcptTestResults.json'
if-no-files-found: ignore

Expand Down

0 comments on commit ce7ae89

Please sign in to comment.