From 1cb09501a972d4f12ef8ffe33914c442bfe4a691 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 14:36:37 -0600 Subject: [PATCH 01/16] Update VSIX installer for project templates --- .../workflows/Cleanup Caches by a branch.yml | 2 +- .../workflows/Dependencies Security Scan.yml | 2 +- .../workflows/Lib edFi.admin.dataaccess.yml | 2 +- .github/workflows/Lib edFi.common.yml | 2 +- .github/workflows/Lib edFi.loadtools.yml | 2 +- .github/workflows/Lib edFi.ods.api.yml | 2 +- .github/workflows/Lib edFi.ods.common.yml | 2 +- .github/workflows/Lib edFi.ods.standard.yml | 2 +- .../Lib edFi.security.dataaccess.yml | 2 +- .github/workflows/Pkg EdFi.Database.Admin.yml | 2 +- .../workflows/Pkg EdFi.Database.Security.yml | 2 +- .github/workflows/Pkg EdFi.Ods.CodeGen.yml | 4 ++-- ...g EdFi.Ods.Minimal.Template.PostgreSQL.yml | 2 +- ...i.Ods.Minimal.Template.TPDM.PostgreSQL.yml | 2 +- .../Pkg EdFi.Ods.Minimal.Template.TPDM.yml | 2 +- .../Pkg EdFi.Ods.Minimal.Template.yml | 2 +- ...EdFi.Ods.Populated.Template.PostgreSQL.yml | 2 +- ...Ods.Populated.Template.TPDM.PostgreSQL.yml | 2 +- .../Pkg EdFi.Ods.Populated.Template.TPDM.yml | 2 +- .../Pkg EdFi.Ods.Populated.Template.yml | 2 +- .../Pkg EdFi.ProjectTemplates.Installer.yml | 21 +++++++++++++++---- .../Scorecard supply-chain security.yml | 2 +- ...itDev workflows in Implementation repo.yml | 2 +- 23 files changed, 40 insertions(+), 27 deletions(-) diff --git a/.github/workflows/Cleanup Caches by a branch.yml b/.github/workflows/Cleanup Caches by a branch.yml index 5e96588f6d..119712d0da 100644 --- a/.github/workflows/Cleanup Caches by a branch.yml +++ b/.github/workflows/Cleanup Caches by a branch.yml @@ -6,7 +6,7 @@ name: Cleanup Caches by a branch on: pull_request: - branches: [main, 'b-v*-patch*','feature-*'] + branches: ['b-v*-patch*','feature-*'] types: [ closed ] permissions: read-all diff --git a/.github/workflows/Dependencies Security Scan.yml b/.github/workflows/Dependencies Security Scan.yml index 02932b1581..6d71d3ca00 100644 --- a/.github/workflows/Dependencies Security Scan.yml +++ b/.github/workflows/Dependencies Security Scan.yml @@ -7,7 +7,7 @@ name: Dependency Review Pull request on: pull_request: - branches: [main, 'b-v*-patch*','feature-*'] + branches: ['b-v*-patch*','feature-*'] permissions: read-all diff --git a/.github/workflows/Lib edFi.admin.dataaccess.yml b/.github/workflows/Lib edFi.admin.dataaccess.yml index 6300584727..15fb7c4116 100644 --- a/.github/workflows/Lib edFi.admin.dataaccess.yml +++ b/.github/workflows/Lib edFi.admin.dataaccess.yml @@ -7,7 +7,7 @@ name: Lib EdFi.Admin.DataAccess on: pull_request: - branches: [main, 'b-v*-patch*','feature-*'] + branches: ['b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Lib edFi.common.yml b/.github/workflows/Lib edFi.common.yml index d2345bf44c..ebf9192b0e 100644 --- a/.github/workflows/Lib edFi.common.yml +++ b/.github/workflows/Lib edFi.common.yml @@ -7,7 +7,7 @@ name: Lib EdFi.Common on: pull_request: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Lib edFi.loadtools.yml b/.github/workflows/Lib edFi.loadtools.yml index 964332de7a..534caf5009 100644 --- a/.github/workflows/Lib edFi.loadtools.yml +++ b/.github/workflows/Lib edFi.loadtools.yml @@ -7,7 +7,7 @@ name: Lib EdFi.LoadTools on: pull_request: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Lib edFi.ods.api.yml b/.github/workflows/Lib edFi.ods.api.yml index 274494620f..f47a978a48 100644 --- a/.github/workflows/Lib edFi.ods.api.yml +++ b/.github/workflows/Lib edFi.ods.api.yml @@ -7,7 +7,7 @@ name: Lib EdFi.Ods.Api on: pull_request: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Lib edFi.ods.common.yml b/.github/workflows/Lib edFi.ods.common.yml index 8afea64111..e6d5895bf6 100644 --- a/.github/workflows/Lib edFi.ods.common.yml +++ b/.github/workflows/Lib edFi.ods.common.yml @@ -7,7 +7,7 @@ name: Lib EdFi.Ods.Common on: pull_request: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Lib edFi.ods.standard.yml b/.github/workflows/Lib edFi.ods.standard.yml index dc956263b1..91454c64d0 100644 --- a/.github/workflows/Lib edFi.ods.standard.yml +++ b/.github/workflows/Lib edFi.ods.standard.yml @@ -7,7 +7,7 @@ name: Lib EdFi.Ods.Standard on: pull_request: - branches: [main, 'b-v*-patch*','feature-*'] + branches: ['b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Lib edFi.security.dataaccess.yml b/.github/workflows/Lib edFi.security.dataaccess.yml index f3fd5fb26c..f9d9f88b78 100644 --- a/.github/workflows/Lib edFi.security.dataaccess.yml +++ b/.github/workflows/Lib edFi.security.dataaccess.yml @@ -7,7 +7,7 @@ name: Lib EdFi.Security.DataAccess on: pull_request: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Pkg EdFi.Database.Admin.yml b/.github/workflows/Pkg EdFi.Database.Admin.yml index f3ab20a737..1a4c1ee925 100644 --- a/.github/workflows/Pkg EdFi.Database.Admin.yml +++ b/.github/workflows/Pkg EdFi.Database.Admin.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Database.Admin on: push: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] paths: - '**.sql' workflow_dispatch: diff --git a/.github/workflows/Pkg EdFi.Database.Security.yml b/.github/workflows/Pkg EdFi.Database.Security.yml index aa2d336013..a30300cf8f 100644 --- a/.github/workflows/Pkg EdFi.Database.Security.yml +++ b/.github/workflows/Pkg EdFi.Database.Security.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Database.Security on: push: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] paths: - '**.sql' workflow_dispatch: diff --git a/.github/workflows/Pkg EdFi.Ods.CodeGen.yml b/.github/workflows/Pkg EdFi.Ods.CodeGen.yml index aa8d5563e4..6f1c21f3da 100644 --- a/.github/workflows/Pkg EdFi.Ods.CodeGen.yml +++ b/.github/workflows/Pkg EdFi.Ods.CodeGen.yml @@ -2,9 +2,9 @@ name: Pkg EdFi.Ods.CodeGen on: pull_request: - branches: [main, 'b-v*-patch*','feature-*'] + branches: ['b-v*-patch*','feature-*'] push: - branches: [main, 'b-v*-patch*','feature-*'] + branches: ['b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml index 4c16308cb0..157b728d8b 100644 --- a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml +++ b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Minimal.Template.PostgreSQL on: push: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml index caddcdc7c0..5f455d3272 100644 --- a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml +++ b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL on: push: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.yml b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.yml index 93bdbdc297..719e545e81 100644 --- a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.yml +++ b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Minimal.Template.TPDM on: push: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.yml b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.yml index f82eebe49f..9eda0ac5bd 100644 --- a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.yml +++ b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Minimal.Template on: push: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml b/.github/workflows/Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml index ff45fe86b7..f25f560801 100644 --- a/.github/workflows/Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml +++ b/.github/workflows/Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Populated.Template.PostgreSQL on: push: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml b/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml index 3794fbe1ed..6c17cd447e 100644 --- a/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml +++ b/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL on: push: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.yml b/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.yml index d0b3b47d1f..85429e48fc 100644 --- a/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.yml +++ b/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Populated.Template.TPDM on: push: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Populated.Template.yml b/.github/workflows/Pkg EdFi.Ods.Populated.Template.yml index 990cd2b4fb..11eea5fa6f 100644 --- a/.github/workflows/Pkg EdFi.Ods.Populated.Template.yml +++ b/.github/workflows/Pkg EdFi.Ods.Populated.Template.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Populated.Template on: push: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml index 55c2a1b407..f22d48966a 100644 --- a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -7,9 +7,9 @@ name: Pkg EdFi.ProjectTemplates.Installer on: pull_request: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [main,'b-v*-patch*','feature-*'] push: - branches: [main, 'b-v*-patch*','feature-*'] + branches: ['b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all @@ -106,19 +106,32 @@ jobs: - name: build run: msbuild "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.sln" /p:Configuration=${{ env.CONFIGURATION }} shell: powershell + - name: List files in directory + shell: powershell + run: | + # Set the target directory + $directoryPath = "$env:GITHUB_WORKSPACE/Ed-Fi-ODS\Utilities\VisualStudioProjectTemplates\EdFi.ProjectTemplates.Installer\bin\${{ env.CONFIGURATION }}\" + + # Check if directory exists + if (Test-Path -Path $directoryPath) { + # Get all files in the directory + Get-ChildItem -Path $directoryPath | ForEach-Object { + Write-Output "File found: $($_.Name)" + } + } else { + Write-Output "Directory does not exist: $directoryPath" + } - name: pack using nuget nuspec file working-directory: ./Ed-Fi-ODS/ shell: powershell run: | .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.nuspec" - name: Install-credential-handler - if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} working-directory: ./Ed-Fi-ODS/ run: | .\build.githubactions.ps1 InstallCredentialHandler shell: powershell - name: publish - if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} working-directory: ./Ed-Fi-ODS/ run: | .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" diff --git a/.github/workflows/Scorecard supply-chain security.yml b/.github/workflows/Scorecard supply-chain security.yml index 8d622fa113..b12efd1d7f 100644 --- a/.github/workflows/Scorecard supply-chain security.yml +++ b/.github/workflows/Scorecard supply-chain security.yml @@ -5,7 +5,7 @@ on: schedule: - cron: '15 23 * * 0' push: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: # Declare default permissions as read only. diff --git a/.github/workflows/Trgr InitDev workflows in Implementation repo.yml b/.github/workflows/Trgr InitDev workflows in Implementation repo.yml index e87cd6b1bc..2ca9ee340e 100644 --- a/.github/workflows/Trgr InitDev workflows in Implementation repo.yml +++ b/.github/workflows/Trgr InitDev workflows in Implementation repo.yml @@ -2,7 +2,7 @@ name: Trgr InitDev workflows in Implementation repo on: pull_request: - branches: [main, 'b-v*-patch*','feature-*'] + branches: [ 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all From 42c430ad259d4a97d3a86e18e5280f68be900884 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 15:23:48 -0600 Subject: [PATCH 02/16] Pack function updated --- build.githubactions.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build.githubactions.ps1 b/build.githubactions.ps1 index 34af70fd36..512e09fb93 100644 --- a/build.githubactions.ps1 +++ b/build.githubactions.ps1 @@ -156,13 +156,15 @@ function Pack { $params = @{ PackageDefinitionFile = $NuspecFilePath Version = $version - PackageId = $PackageName + Properties = @{ + configuration = $Configuration + id = $PackageName + } OutputDirectory = $packageOutput - BuildConfiguration = $Configuration } & "$PSScriptRoot/../Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1" - + Write-Host "NuspecFilePath & PackageName exists" New-Package @params | Out-Host } if ([string]::IsNullOrWhiteSpace($NuspecFilePath) -and $null -ne $PackageName){ From 1ee0648189fb64757448a386ccfcb9a5f0d2cc23 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 15:52:10 -0600 Subject: [PATCH 03/16] NuspecFilePath & PackageName exists --- build.githubactions.ps1 | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/build.githubactions.ps1 b/build.githubactions.ps1 index 512e09fb93..ab9b194252 100644 --- a/build.githubactions.ps1 +++ b/build.githubactions.ps1 @@ -69,6 +69,9 @@ param( [string] $RelativeRepoPath, + [string] + $Copyright = "Copyright @ " + $((Get-Date).year) + " Ed-Fi Alliance, LLC and Contributors", + [ValidateSet('4.0.0', '5.2.0')] [string] $StandardVersion @@ -153,19 +156,14 @@ function Pack { } } if ($NuspecFilePath -Like "*.nuspec" -and $null -ne $PackageName){ - $params = @{ - PackageDefinitionFile = $NuspecFilePath - Version = $version - Properties = @{ - configuration = $Configuration - id = $PackageName - } - OutputDirectory = $packageOutput - } - - & "$PSScriptRoot/../Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1" Write-Host "NuspecFilePath & PackageName exists" - New-Package @params | Out-Host + + $xml = [xml](Get-Content $NuspecFilePath) + $xml.package.metadata.id = $PackageName + $xml.package.metadata.description = $PackageName + $xml.Save($NuspecFilePath) + nuget pack $NuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties configuration=$Configuration -Properties copyright=$Copyright -NoPackageAnalysis -NoDefaultExcludes + } if ([string]::IsNullOrWhiteSpace($NuspecFilePath) -and $null -ne $PackageName){ Invoke-Execute { From d663b7ac6a0edf9ac1055beee018a663d90c3374 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 16:23:58 -0600 Subject: [PATCH 04/16] publish Step Updated --- .../Pkg EdFi.ProjectTemplates.Installer.yml | 4 +- build.githubactions.ps1 | 47 +++++++++---------- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml index f22d48966a..df35241969 100644 --- a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -134,10 +134,10 @@ jobs: - name: publish working-directory: ./Ed-Fi-ODS/ run: | - .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" + .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -ProjectFile "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.csproj" -PackageName "EdFi.Suite3.ProjectTemplates.Installer" shell: powershell - name: Upload EdFi.Suite3.ProjectTemplates.Installer Artifacts - if: success() + if: success() || failure() uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: name: NugetPackages.Artifacts diff --git a/build.githubactions.ps1 b/build.githubactions.ps1 index ab9b194252..bd20c6b5c6 100644 --- a/build.githubactions.ps1 +++ b/build.githubactions.ps1 @@ -254,30 +254,29 @@ function Get-IsWindows { } function InstallCredentialHandler { - if (Get-IsWindows -and -not Get-InstalledModule | Where-Object -Property Name -eq "7Zip4Powershell") { - Install-Module -Force -Scope CurrentUser -Name 7Zip4Powershell - Write-Host "Installed 7Zip4Powershell." - } - # using WebClient is faster then Invoke-WebRequest but shows no progress - $sourceUrl = ' https://github.com/microsoft/artifacts-credprovider/releases/download/v1.0.0/Microsoft.NuGet.CredentialProvider.zip' - $fileName = 'Microsoft.NuGet.CredentialProvider.zip' - $zipFilePath = Join-Path ([IO.Path]::GetTempPath()) $fileName - Write-Host "Downloading file from $sourceUrl..." - $webClient = New-Object System.Net.WebClient - $webClient.DownloadFile($sourceUrl, $zipFilePath) - Write-Host "Download complete." - if (-not (Test-Path $zipFilePath)) { - Write-Warning "Microsoft.NuGet.CredentialProvider file '$fileName' not found." - exit 0 - } - $packageFolder = Join-Path ([IO.Path]::GetTempPath()) 'Microsoft.NuGet.CredentialProvider/' - if ($fileName.EndsWith('.zip')) { - Write-Host "Extracting $fileName..." - - if (Test-Path $zipFilePath) { Expand-Archive -Force -Path $zipFilePath -DestinationPath $packageFolder } - Copy-Item -Path $packageFolder\* -Destination "~/.nuget/" -Recurse -Force - Write-Host "Extracted to: ~\.nuget\plugins\" -ForegroundColor Green - } + if (Get-IsWindows -and -not Get-InstalledModule | Where-Object -Property Name -eq "7Zip4Powershell") { + Install-Module -Force -Scope CurrentUser -Name 7Zip4Powershell + } + # using WebClient is faster then Invoke-WebRequest but shows no progress + $sourceUrl = ' https://github.com/microsoft/artifacts-credprovider/releases/download/v1.0.0/Microsoft.NuGet.CredentialProvider.zip' + $fileName = 'Microsoft.NuGet.CredentialProvider.zip' + $zipFilePath = Join-Path ([IO.Path]::GetTempPath()) $fileName + Write-host "Downloading file from $sourceUrl..." + $webClient = New-Object System.Net.WebClient + $webClient.DownloadFile($sourceUrl, $zipFilePath) + Write-host "Download complete." + if (-not (Test-Path $zipFilePath)) { + Write-Warning "Microsoft.NuGet.CredentialProvider file '$fileName' not found." + exit 0 + } + $packageFolder = Join-Path ([IO.Path]::GetTempPath()) 'Microsoft.NuGet.CredentialProvider/' + if ($fileName.EndsWith('.zip')) { + Write-host "Extracting $fileName..." + + if (Test-Path $zipFilePath) { Expand-Archive -Force -Path $zipFilePath -DestinationPath $packageFolder } + Copy-Item -Path $packageFolder\* -Destination "~/.nuget/" -Recurse -Force + Write-Host "Extracted to: ~\.nuget\plugins\" -ForegroundColor Green + } } From 984a9736c33401fe6d3018203f6a2fe8535dd36c Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 16:38:12 -0600 Subject: [PATCH 05/16] publish Step Updated --- .github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml index df35241969..8cd046fec6 100644 --- a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -20,7 +20,7 @@ concurrency: env: INFORMATIONAL_VERSION: "7.3" - BUILD_INCREMENTER: "-268" + BUILD_INCREMENTER: "-570" AZURE_ARTIFACT_URL: "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_packaging/EdFi/nuget/v3/index.json" AZURE_ARTIFACT_NUGET_KEY: ${{ secrets.AZURE_ARTIFACTS_PERSONAL_ACCESS_TOKEN }} VSS_NUGET_EXTERNAL_FEED_ENDPOINTS : '{"endpointCredentials": [{"endpoint": "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_packaging/EdFi/nuget/v3/index.json","password": "${{ secrets.AZURE_ARTIFACTS_PERSONAL_ACCESS_TOKEN }}"}]}' @@ -123,9 +123,9 @@ jobs: } - name: pack using nuget nuspec file working-directory: ./Ed-Fi-ODS/ - shell: powershell run: | .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.nuspec" + shell: powershell - name: Install-credential-handler working-directory: ./Ed-Fi-ODS/ run: | @@ -134,7 +134,7 @@ jobs: - name: publish working-directory: ./Ed-Fi-ODS/ run: | - .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -ProjectFile "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.csproj" -PackageName "EdFi.Suite3.ProjectTemplates.Installer" + .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" shell: powershell - name: Upload EdFi.Suite3.ProjectTemplates.Installer Artifacts if: success() || failure() From f762edbefd641c6f1d57a6b366c5422a143db700 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 16:51:35 -0600 Subject: [PATCH 06/16] Install-credential-handler Step Updated --- .../Pkg EdFi.ProjectTemplates.Installer.yml | 37 ++++++++++++++++--- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml index 8cd046fec6..5d72459f48 100644 --- a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -20,7 +20,7 @@ concurrency: env: INFORMATIONAL_VERSION: "7.3" - BUILD_INCREMENTER: "-570" + BUILD_INCREMENTER: "-839" AZURE_ARTIFACT_URL: "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_packaging/EdFi/nuget/v3/index.json" AZURE_ARTIFACT_NUGET_KEY: ${{ secrets.AZURE_ARTIFACTS_PERSONAL_ACCESS_TOKEN }} VSS_NUGET_EXTERNAL_FEED_ENDPOINTS : '{"endpointCredentials": [{"endpoint": "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_packaging/EdFi/nuget/v3/index.json","password": "${{ secrets.AZURE_ARTIFACTS_PERSONAL_ACCESS_TOKEN }}"}]}' @@ -127,10 +127,37 @@ jobs: .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.nuspec" shell: powershell - name: Install-credential-handler - working-directory: ./Ed-Fi-ODS/ - run: | - .\build.githubactions.ps1 InstallCredentialHandler - shell: powershell + working-directory: ./Ed-Fi-ODS/ + run: | + Import-Module -Force -Scope Global "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/logistics/scripts/modules/utility/cross-platform.psm1" + if (Get-IsWindows -and -not Get-InstalledModule | Where-Object -Property Name -eq "7Zip4Powershell") { + Install-Module -Force -Scope CurrentUser -Name 7Zip4Powershell + } + + # using WebClient is faster then Invoke-WebRequest but shows no progress + $sourceUrl = ' https://github.com/microsoft/artifacts-credprovider/releases/download/v1.0.0/Microsoft.NuGet.CredentialProvider.zip' + $fileName = 'Microsoft.NuGet.CredentialProvider.zip' + Write-host "Downloading file from $sourceUrl..." + $webClient = New-Object System.Net.WebClient + $webClient.DownloadFile($sourceUrl, "$env:temp/$fileName") + + Write-host "Download complete." + + if (-not (Test-Path "$env:temp/$fileName")) { + Write-Warning "Microsoft.NuGet.CredentialProvider file '$fileName' not found." + exit 0 + } + + $packageFolder = "$env:temp/Microsoft.NuGet.CredentialProvider/" + + if ($fileName.EndsWith('.zip')) { + Write-host "Extracting $fileName..." + $zipFilePath = "$env:temp/$fileName" + if (Test-Path $zipFilePath) { Expand-Archive -Force -Path $zipFilePath -DestinationPath $packageFolder } + Copy-Item -Path $packageFolder\* -Destination "$env:UserProfile/.nuget/" -Recurse -Force + Write-Host "Extracted to: $env:UserProfile\.nuget\plugins\" -ForegroundColor Green + } + shell: powershell - name: publish working-directory: ./Ed-Fi-ODS/ run: | From 897657eefbebac1a69c0dc708c644fb8adcd2fa2 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 17:15:34 -0600 Subject: [PATCH 07/16] Install-credential-handler Step Added --- .github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml index 5d72459f48..0cde5c4a0c 100644 --- a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -127,29 +127,24 @@ jobs: .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.nuspec" shell: powershell - name: Install-credential-handler - working-directory: ./Ed-Fi-ODS/ run: | Import-Module -Force -Scope Global "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/logistics/scripts/modules/utility/cross-platform.psm1" if (Get-IsWindows -and -not Get-InstalledModule | Where-Object -Property Name -eq "7Zip4Powershell") { + Write-host "7Zip4Powershell Module Installed." Install-Module -Force -Scope CurrentUser -Name 7Zip4Powershell } - # using WebClient is faster then Invoke-WebRequest but shows no progress $sourceUrl = ' https://github.com/microsoft/artifacts-credprovider/releases/download/v1.0.0/Microsoft.NuGet.CredentialProvider.zip' $fileName = 'Microsoft.NuGet.CredentialProvider.zip' Write-host "Downloading file from $sourceUrl..." $webClient = New-Object System.Net.WebClient $webClient.DownloadFile($sourceUrl, "$env:temp/$fileName") - Write-host "Download complete." - if (-not (Test-Path "$env:temp/$fileName")) { Write-Warning "Microsoft.NuGet.CredentialProvider file '$fileName' not found." exit 0 } - $packageFolder = "$env:temp/Microsoft.NuGet.CredentialProvider/" - if ($fileName.EndsWith('.zip')) { Write-host "Extracting $fileName..." $zipFilePath = "$env:temp/$fileName" From 94ff8ae78c970e661cbf75a704b1bcd4ae958817 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 20:51:56 -0600 Subject: [PATCH 08/16] windows-2019 updated --- .github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml index 0cde5c4a0c..ed7679d6c1 100644 --- a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -33,7 +33,7 @@ env: jobs: build: - runs-on: windows-latest + runs-on: windows-2019 steps: - name: Check for Azure token if: ${{ env.REPOSITORY_OWNER == 'Ed-Fi-Alliance-OSS' && env.AZURE_ARTIFACT_NUGET_KEY == '' }} From 0550011abada62b18212d00ecf8df39b11cad0a9 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 21:02:29 -0600 Subject: [PATCH 09/16] artifacts-credprovider updated --- .github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml index ed7679d6c1..7021293790 100644 --- a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -33,7 +33,7 @@ env: jobs: build: - runs-on: windows-2019 + runs-on: windows-latest steps: - name: Check for Azure token if: ${{ env.REPOSITORY_OWNER == 'Ed-Fi-Alliance-OSS' && env.AZURE_ARTIFACT_NUGET_KEY == '' }} @@ -134,7 +134,8 @@ jobs: Install-Module -Force -Scope CurrentUser -Name 7Zip4Powershell } # using WebClient is faster then Invoke-WebRequest but shows no progress - $sourceUrl = ' https://github.com/microsoft/artifacts-credprovider/releases/download/v1.0.0/Microsoft.NuGet.CredentialProvider.zip' + $sourceUrl = 'https://github.com/microsoft/artifacts-credprovider/releases/download/v1.3.0/Microsoft.Net8.NuGet.CredentialProvider.zip' + $fileName = 'Microsoft.NuGet.CredentialProvider.zip' Write-host "Downloading file from $sourceUrl..." $webClient = New-Object System.Net.WebClient From d2393c3a79a8af0b5a27e0ccc6d5a21f3451d8c6 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 21:14:15 -0600 Subject: [PATCH 10/16] Install-credential-handler Step updated --- .../Pkg EdFi.ProjectTemplates.Installer.yml | 60 +++++++++++-------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml index 7021293790..004e2aa5e1 100644 --- a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -128,32 +128,40 @@ jobs: shell: powershell - name: Install-credential-handler run: | - Import-Module -Force -Scope Global "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/logistics/scripts/modules/utility/cross-platform.psm1" - if (Get-IsWindows -and -not Get-InstalledModule | Where-Object -Property Name -eq "7Zip4Powershell") { - Write-host "7Zip4Powershell Module Installed." - Install-Module -Force -Scope CurrentUser -Name 7Zip4Powershell - } - # using WebClient is faster then Invoke-WebRequest but shows no progress - $sourceUrl = 'https://github.com/microsoft/artifacts-credprovider/releases/download/v1.3.0/Microsoft.Net8.NuGet.CredentialProvider.zip' - - $fileName = 'Microsoft.NuGet.CredentialProvider.zip' - Write-host "Downloading file from $sourceUrl..." - $webClient = New-Object System.Net.WebClient - $webClient.DownloadFile($sourceUrl, "$env:temp/$fileName") - Write-host "Download complete." - if (-not (Test-Path "$env:temp/$fileName")) { - Write-Warning "Microsoft.NuGet.CredentialProvider file '$fileName' not found." - exit 0 - } - $packageFolder = "$env:temp/Microsoft.NuGet.CredentialProvider/" - if ($fileName.EndsWith('.zip')) { - Write-host "Extracting $fileName..." - $zipFilePath = "$env:temp/$fileName" - if (Test-Path $zipFilePath) { Expand-Archive -Force -Path $zipFilePath -DestinationPath $packageFolder } - Copy-Item -Path $packageFolder\* -Destination "$env:UserProfile/.nuget/" -Recurse -Force - Write-Host "Extracted to: $env:UserProfile\.nuget\plugins\" -ForegroundColor Green - } - shell: powershell + Import-Module -Force -Scope Global "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/logistics/scripts/modules/utility/cross-platform.psm1" + + if (Get-IsWindows -and -not (Get-InstalledModule -Name "7Zip4Powershell")) { + Write-Host "Installing 7Zip4Powershell Module..." + Install-Module -Force -Scope CurrentUser -Name 7Zip4Powershell + } + + # Download the NuGet Credential Provider ZIP + $sourceUrl = 'https://github.com/microsoft/artifacts-credprovider/releases/download/v1.3.0/Microsoft.Net8.NuGet.CredentialProvider.zip' + $fileName = 'Microsoft.NuGet.CredentialProvider.zip' + Write-Host "Downloading file from $sourceUrl..." + $webClient = New-Object System.Net.WebClient + $webClient.DownloadFile($sourceUrl, "$env:temp\$fileName") + Write-Host "Download complete." + + if (-not (Test-Path "$env:temp\$fileName")) { + Write-Warning "Microsoft.NuGet.CredentialProvider file '$fileName' not found." + exit 0 + } + + # Extract the ZIP file + $packageFolder = "$env:temp\Microsoft.NuGet.CredentialProvider" + if ($fileName.EndsWith('.zip')) { + Write-Host "Extracting $fileName..." + $zipFilePath = "$env:temp\$fileName" + if (Test-Path $zipFilePath) { + Expand-Archive -Force -Path $zipFilePath -DestinationPath $packageFolder + } + + # Copy to the .nuget folder for NuGet to recognize the credential provider + Copy-Item -Path "$packageFolder\*" -Destination "$env:USERPROFILE\.nuget\plugins\" -Recurse -Force + Write-Host "Extracted to: $env:USERPROFILE\.nuget\plugins\" -ForegroundColor Green + } + shell: powershell - name: publish working-directory: ./Ed-Fi-ODS/ run: | From b6b79eeb8baf692173c35c0f787d37c02bb9a35f Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 21:20:38 -0600 Subject: [PATCH 11/16] Install-credential-handler --- .../Pkg EdFi.ProjectTemplates.Installer.yml | 35 +------------------ 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml index 004e2aa5e1..c58495d55d 100644 --- a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -127,40 +127,7 @@ jobs: .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.nuspec" shell: powershell - name: Install-credential-handler - run: | - Import-Module -Force -Scope Global "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/logistics/scripts/modules/utility/cross-platform.psm1" - - if (Get-IsWindows -and -not (Get-InstalledModule -Name "7Zip4Powershell")) { - Write-Host "Installing 7Zip4Powershell Module..." - Install-Module -Force -Scope CurrentUser -Name 7Zip4Powershell - } - - # Download the NuGet Credential Provider ZIP - $sourceUrl = 'https://github.com/microsoft/artifacts-credprovider/releases/download/v1.3.0/Microsoft.Net8.NuGet.CredentialProvider.zip' - $fileName = 'Microsoft.NuGet.CredentialProvider.zip' - Write-Host "Downloading file from $sourceUrl..." - $webClient = New-Object System.Net.WebClient - $webClient.DownloadFile($sourceUrl, "$env:temp\$fileName") - Write-Host "Download complete." - - if (-not (Test-Path "$env:temp\$fileName")) { - Write-Warning "Microsoft.NuGet.CredentialProvider file '$fileName' not found." - exit 0 - } - - # Extract the ZIP file - $packageFolder = "$env:temp\Microsoft.NuGet.CredentialProvider" - if ($fileName.EndsWith('.zip')) { - Write-Host "Extracting $fileName..." - $zipFilePath = "$env:temp\$fileName" - if (Test-Path $zipFilePath) { - Expand-Archive -Force -Path $zipFilePath -DestinationPath $packageFolder - } - - # Copy to the .nuget folder for NuGet to recognize the credential provider - Copy-Item -Path "$packageFolder\*" -Destination "$env:USERPROFILE\.nuget\plugins\" -Recurse -Force - Write-Host "Extracted to: $env:USERPROFILE\.nuget\plugins\" -ForegroundColor Green - } + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" shell: powershell - name: publish working-directory: ./Ed-Fi-ODS/ From 8c73c83a0cad37efaa371be01ec5b07f0f3e7a0e Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 21:25:53 -0600 Subject: [PATCH 12/16] Clean up --- .../Pkg EdFi.ProjectTemplates.Installer.yml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml index c58495d55d..782431eb87 100644 --- a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -106,26 +106,11 @@ jobs: - name: build run: msbuild "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.sln" /p:Configuration=${{ env.CONFIGURATION }} shell: powershell - - name: List files in directory - shell: powershell - run: | - # Set the target directory - $directoryPath = "$env:GITHUB_WORKSPACE/Ed-Fi-ODS\Utilities\VisualStudioProjectTemplates\EdFi.ProjectTemplates.Installer\bin\${{ env.CONFIGURATION }}\" - - # Check if directory exists - if (Test-Path -Path $directoryPath) { - # Get all files in the directory - Get-ChildItem -Path $directoryPath | ForEach-Object { - Write-Output "File found: $($_.Name)" - } - } else { - Write-Output "Directory does not exist: $directoryPath" - } - name: pack using nuget nuspec file working-directory: ./Ed-Fi-ODS/ + shell: powershell run: | .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.nuspec" - shell: powershell - name: Install-credential-handler run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" shell: powershell @@ -135,7 +120,7 @@ jobs: .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" shell: powershell - name: Upload EdFi.Suite3.ProjectTemplates.Installer Artifacts - if: success() || failure() + if: success() uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: name: NugetPackages.Artifacts From 01912343a608b41676b53f21c7eb3978da468e1b Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 21:31:20 -0600 Subject: [PATCH 13/16] Pkg EdFi.Database.Admin & Pkg EdFi.Database.Security updated --- .github/workflows/Pkg EdFi.Database.Admin.yml | 8 +++----- .github/workflows/Pkg EdFi.Database.Security.yml | 8 +++----- .github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/Pkg EdFi.Database.Admin.yml b/.github/workflows/Pkg EdFi.Database.Admin.yml index 1a4c1ee925..8fa74f6981 100644 --- a/.github/workflows/Pkg EdFi.Database.Admin.yml +++ b/.github/workflows/Pkg EdFi.Database.Admin.yml @@ -6,6 +6,8 @@ name: Pkg EdFi.Database.Admin on: + pull_request: + branches: [main,'b-v*-patch*','feature-*'] push: branches: [ 'b-v*-patch*','feature-*'] paths: @@ -113,13 +115,9 @@ jobs: nuget pack $AdminBACPACNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright © $(date +'%Y') Ed-Fi Alliance, LLC and Contributors" -NoPackageAnalysis -NoDefaultExcludes nuget pack $AdminPostgreSQLNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright © $(date +'%Y') Ed-Fi Alliance, LLC and Contributors" -NoPackageAnalysis -NoDefaultExcludes - name: Install-credential-handler - if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} - working-directory: ./Ed-Fi-ODS/ - run: | - .\build.githubactions.ps1 InstallCredentialHandler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" shell: powershell - name: Publish Nuget package - if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} working-directory: ./Ed-Fi-ODS/ run: | .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Database.Admin.Standard.${{ matrix.StandardVersion }}" diff --git a/.github/workflows/Pkg EdFi.Database.Security.yml b/.github/workflows/Pkg EdFi.Database.Security.yml index a30300cf8f..a37c5b822f 100644 --- a/.github/workflows/Pkg EdFi.Database.Security.yml +++ b/.github/workflows/Pkg EdFi.Database.Security.yml @@ -6,6 +6,8 @@ name: Pkg EdFi.Database.Security on: + pull_request: + branches: [main,'b-v*-patch*','feature-*'] push: branches: [ 'b-v*-patch*','feature-*'] paths: @@ -113,14 +115,10 @@ jobs: nuget pack $SecurityBACPACNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright © $(date +'%Y') Ed-Fi Alliance, LLC and Contributors" -NoPackageAnalysis -NoDefaultExcludes nuget pack $SecurityPostgreSQLNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright © $(date +'%Y') Ed-Fi Alliance, LLC and Contributors" -NoPackageAnalysis -NoDefaultExcludes - name: Install-credential-handler - if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} - working-directory: ./Ed-Fi-ODS/ - run: | - .\build.githubactions.ps1 InstallCredentialHandler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" shell: powershell - name: Publish Nuget package working-directory: ./Ed-Fi-ODS/ - if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} run: | .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Database.Security.Standard.${{ matrix.StandardVersion }}" .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Database.Security.BACPAC.Standard.${{ matrix.StandardVersion }}" diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml index 782431eb87..c48e569d25 100644 --- a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -108,7 +108,7 @@ jobs: shell: powershell - name: pack using nuget nuspec file working-directory: ./Ed-Fi-ODS/ - shell: powershell + shell: powershell run: | .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.nuspec" - name: Install-credential-handler From 1e63ea8f5ce3cb75ddfb63841a1902c5185ae392 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 21:34:10 -0600 Subject: [PATCH 14/16] Clean up --- .github/workflows/Cleanup Caches by a branch.yml | 2 +- .github/workflows/Dependencies Security Scan.yml | 2 +- .github/workflows/Lib edFi.admin.dataaccess.yml | 2 +- .github/workflows/Lib edFi.common.yml | 2 +- .github/workflows/Lib edFi.loadtools.yml | 2 +- .github/workflows/Lib edFi.ods.api.yml | 2 +- .github/workflows/Lib edFi.ods.common.yml | 2 +- .github/workflows/Lib edFi.ods.standard.yml | 2 +- .github/workflows/Lib edFi.security.dataaccess.yml | 2 +- .github/workflows/Pkg EdFi.Database.Admin.yml | 2 +- .github/workflows/Pkg EdFi.Database.Security.yml | 2 +- .github/workflows/Pkg EdFi.Ods.CodeGen.yml | 4 ++-- .../workflows/Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml | 2 +- .../Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml | 2 +- .github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.yml | 2 +- .github/workflows/Pkg EdFi.Ods.Minimal.Template.yml | 2 +- .../workflows/Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml | 2 +- .../Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml | 2 +- .github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.yml | 2 +- .github/workflows/Pkg EdFi.Ods.Populated.Template.yml | 2 +- .github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml | 2 +- .github/workflows/Scorecard supply-chain security.yml | 2 +- .../Trgr InitDev workflows in Implementation repo.yml | 2 +- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/Cleanup Caches by a branch.yml b/.github/workflows/Cleanup Caches by a branch.yml index 119712d0da..5e96588f6d 100644 --- a/.github/workflows/Cleanup Caches by a branch.yml +++ b/.github/workflows/Cleanup Caches by a branch.yml @@ -6,7 +6,7 @@ name: Cleanup Caches by a branch on: pull_request: - branches: ['b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] types: [ closed ] permissions: read-all diff --git a/.github/workflows/Dependencies Security Scan.yml b/.github/workflows/Dependencies Security Scan.yml index 6d71d3ca00..02932b1581 100644 --- a/.github/workflows/Dependencies Security Scan.yml +++ b/.github/workflows/Dependencies Security Scan.yml @@ -7,7 +7,7 @@ name: Dependency Review Pull request on: pull_request: - branches: ['b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] permissions: read-all diff --git a/.github/workflows/Lib edFi.admin.dataaccess.yml b/.github/workflows/Lib edFi.admin.dataaccess.yml index 15fb7c4116..6300584727 100644 --- a/.github/workflows/Lib edFi.admin.dataaccess.yml +++ b/.github/workflows/Lib edFi.admin.dataaccess.yml @@ -7,7 +7,7 @@ name: Lib EdFi.Admin.DataAccess on: pull_request: - branches: ['b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Lib edFi.common.yml b/.github/workflows/Lib edFi.common.yml index ebf9192b0e..d2345bf44c 100644 --- a/.github/workflows/Lib edFi.common.yml +++ b/.github/workflows/Lib edFi.common.yml @@ -7,7 +7,7 @@ name: Lib EdFi.Common on: pull_request: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Lib edFi.loadtools.yml b/.github/workflows/Lib edFi.loadtools.yml index 534caf5009..964332de7a 100644 --- a/.github/workflows/Lib edFi.loadtools.yml +++ b/.github/workflows/Lib edFi.loadtools.yml @@ -7,7 +7,7 @@ name: Lib EdFi.LoadTools on: pull_request: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Lib edFi.ods.api.yml b/.github/workflows/Lib edFi.ods.api.yml index f47a978a48..274494620f 100644 --- a/.github/workflows/Lib edFi.ods.api.yml +++ b/.github/workflows/Lib edFi.ods.api.yml @@ -7,7 +7,7 @@ name: Lib EdFi.Ods.Api on: pull_request: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Lib edFi.ods.common.yml b/.github/workflows/Lib edFi.ods.common.yml index e6d5895bf6..8afea64111 100644 --- a/.github/workflows/Lib edFi.ods.common.yml +++ b/.github/workflows/Lib edFi.ods.common.yml @@ -7,7 +7,7 @@ name: Lib EdFi.Ods.Common on: pull_request: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Lib edFi.ods.standard.yml b/.github/workflows/Lib edFi.ods.standard.yml index 91454c64d0..dc956263b1 100644 --- a/.github/workflows/Lib edFi.ods.standard.yml +++ b/.github/workflows/Lib edFi.ods.standard.yml @@ -7,7 +7,7 @@ name: Lib EdFi.Ods.Standard on: pull_request: - branches: ['b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Lib edFi.security.dataaccess.yml b/.github/workflows/Lib edFi.security.dataaccess.yml index f9d9f88b78..f3fd5fb26c 100644 --- a/.github/workflows/Lib edFi.security.dataaccess.yml +++ b/.github/workflows/Lib edFi.security.dataaccess.yml @@ -7,7 +7,7 @@ name: Lib EdFi.Security.DataAccess on: pull_request: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Pkg EdFi.Database.Admin.yml b/.github/workflows/Pkg EdFi.Database.Admin.yml index 8fa74f6981..869b36e097 100644 --- a/.github/workflows/Pkg EdFi.Database.Admin.yml +++ b/.github/workflows/Pkg EdFi.Database.Admin.yml @@ -9,7 +9,7 @@ on: pull_request: branches: [main,'b-v*-patch*','feature-*'] push: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] paths: - '**.sql' workflow_dispatch: diff --git a/.github/workflows/Pkg EdFi.Database.Security.yml b/.github/workflows/Pkg EdFi.Database.Security.yml index a37c5b822f..ec1f340b7c 100644 --- a/.github/workflows/Pkg EdFi.Database.Security.yml +++ b/.github/workflows/Pkg EdFi.Database.Security.yml @@ -9,7 +9,7 @@ on: pull_request: branches: [main,'b-v*-patch*','feature-*'] push: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] paths: - '**.sql' workflow_dispatch: diff --git a/.github/workflows/Pkg EdFi.Ods.CodeGen.yml b/.github/workflows/Pkg EdFi.Ods.CodeGen.yml index 6f1c21f3da..aa8d5563e4 100644 --- a/.github/workflows/Pkg EdFi.Ods.CodeGen.yml +++ b/.github/workflows/Pkg EdFi.Ods.CodeGen.yml @@ -2,9 +2,9 @@ name: Pkg EdFi.Ods.CodeGen on: pull_request: - branches: ['b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] push: - branches: ['b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml index 157b728d8b..4c16308cb0 100644 --- a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml +++ b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Minimal.Template.PostgreSQL on: push: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml index 5f455d3272..caddcdc7c0 100644 --- a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml +++ b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL on: push: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.yml b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.yml index 719e545e81..93bdbdc297 100644 --- a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.yml +++ b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Minimal.Template.TPDM on: push: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.yml b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.yml index 9eda0ac5bd..f82eebe49f 100644 --- a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.yml +++ b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Minimal.Template on: push: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml b/.github/workflows/Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml index f25f560801..ff45fe86b7 100644 --- a/.github/workflows/Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml +++ b/.github/workflows/Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Populated.Template.PostgreSQL on: push: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml b/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml index 6c17cd447e..3794fbe1ed 100644 --- a/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml +++ b/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL on: push: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.yml b/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.yml index 85429e48fc..d0b3b47d1f 100644 --- a/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.yml +++ b/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Populated.Template.TPDM on: push: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.Ods.Populated.Template.yml b/.github/workflows/Pkg EdFi.Ods.Populated.Template.yml index 11eea5fa6f..990cd2b4fb 100644 --- a/.github/workflows/Pkg EdFi.Ods.Populated.Template.yml +++ b/.github/workflows/Pkg EdFi.Ods.Populated.Template.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.Ods.Populated.Template on: push: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: inputs: distinct_id: diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml index c48e569d25..a53e6396d7 100644 --- a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -9,7 +9,7 @@ on: pull_request: branches: [main,'b-v*-patch*','feature-*'] push: - branches: ['b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/Scorecard supply-chain security.yml b/.github/workflows/Scorecard supply-chain security.yml index b12efd1d7f..8d622fa113 100644 --- a/.github/workflows/Scorecard supply-chain security.yml +++ b/.github/workflows/Scorecard supply-chain security.yml @@ -5,7 +5,7 @@ on: schedule: - cron: '15 23 * * 0' push: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: # Declare default permissions as read only. diff --git a/.github/workflows/Trgr InitDev workflows in Implementation repo.yml b/.github/workflows/Trgr InitDev workflows in Implementation repo.yml index 2ca9ee340e..e87cd6b1bc 100644 --- a/.github/workflows/Trgr InitDev workflows in Implementation repo.yml +++ b/.github/workflows/Trgr InitDev workflows in Implementation repo.yml @@ -2,7 +2,7 @@ name: Trgr InitDev workflows in Implementation repo on: pull_request: - branches: [ 'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: permissions: read-all From bb4658faf59c7a60df2d7fac94a6a9279d336487 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 21:36:55 -0600 Subject: [PATCH 15/16] clean up --- build.githubactions.ps1 | 50 ++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/build.githubactions.ps1 b/build.githubactions.ps1 index bd20c6b5c6..3dca062314 100644 --- a/build.githubactions.ps1 +++ b/build.githubactions.ps1 @@ -156,7 +156,6 @@ function Pack { } } if ($NuspecFilePath -Like "*.nuspec" -and $null -ne $PackageName){ - Write-Host "NuspecFilePath & PackageName exists" $xml = [xml](Get-Content $NuspecFilePath) $xml.package.metadata.id = $PackageName @@ -254,32 +253,31 @@ function Get-IsWindows { } function InstallCredentialHandler { - if (Get-IsWindows -and -not Get-InstalledModule | Where-Object -Property Name -eq "7Zip4Powershell") { - Install-Module -Force -Scope CurrentUser -Name 7Zip4Powershell - } - # using WebClient is faster then Invoke-WebRequest but shows no progress - $sourceUrl = ' https://github.com/microsoft/artifacts-credprovider/releases/download/v1.0.0/Microsoft.NuGet.CredentialProvider.zip' - $fileName = 'Microsoft.NuGet.CredentialProvider.zip' - $zipFilePath = Join-Path ([IO.Path]::GetTempPath()) $fileName - Write-host "Downloading file from $sourceUrl..." - $webClient = New-Object System.Net.WebClient - $webClient.DownloadFile($sourceUrl, $zipFilePath) - Write-host "Download complete." - if (-not (Test-Path $zipFilePath)) { - Write-Warning "Microsoft.NuGet.CredentialProvider file '$fileName' not found." - exit 0 - } - $packageFolder = Join-Path ([IO.Path]::GetTempPath()) 'Microsoft.NuGet.CredentialProvider/' - if ($fileName.EndsWith('.zip')) { - Write-host "Extracting $fileName..." - - if (Test-Path $zipFilePath) { Expand-Archive -Force -Path $zipFilePath -DestinationPath $packageFolder } - Copy-Item -Path $packageFolder\* -Destination "~/.nuget/" -Recurse -Force - Write-Host "Extracted to: ~\.nuget\plugins\" -ForegroundColor Green - } - + if (Get-IsWindows -and -not Get-InstalledModule | Where-Object -Property Name -eq "7Zip4Powershell") { + Install-Module -Force -Scope CurrentUser -Name 7Zip4Powershell + Write-Host "Installed 7Zip4Powershell." + } + # using WebClient is faster then Invoke-WebRequest but shows no progress + $sourceUrl = ' https://github.com/microsoft/artifacts-credprovider/releases/download/v1.0.0/Microsoft.NuGet.CredentialProvider.zip' + $fileName = 'Microsoft.NuGet.CredentialProvider.zip' + $zipFilePath = Join-Path ([IO.Path]::GetTempPath()) $fileName + Write-Host "Downloading file from $sourceUrl..." + $webClient = New-Object System.Net.WebClient + $webClient.DownloadFile($sourceUrl, $zipFilePath) + Write-Host "Download complete." + if (-not (Test-Path $zipFilePath)) { + Write-Warning "Microsoft.NuGet.CredentialProvider file '$fileName' not found." + exit 0 + } + $packageFolder = Join-Path ([IO.Path]::GetTempPath()) 'Microsoft.NuGet.CredentialProvider/' + if ($fileName.EndsWith('.zip')) { + Write-Host "Extracting $fileName..." + + if (Test-Path $zipFilePath) { Expand-Archive -Force -Path $zipFilePath -DestinationPath $packageFolder } + Copy-Item -Path $packageFolder\* -Destination "~/.nuget/" -Recurse -Force + Write-Host "Extracted to: ~\.nuget\plugins\" -ForegroundColor Green + } } - function StandardVersions { $standardProjectDirectory = Split-Path $Solution -Resolve From e37a2b7f3e7ad7c71eee135b0ceced48e7c97095 Mon Sep 17 00:00:00 2001 From: "m.semalaiappan" Date: Wed, 13 Nov 2024 22:03:26 -0600 Subject: [PATCH 16/16] clean up --- .github/workflows/Pkg EdFi.Database.Admin.yml | 4 ++-- .github/workflows/Pkg EdFi.Database.Security.yml | 4 ++-- .github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml | 4 +++- build.githubactions.ps1 | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Pkg EdFi.Database.Admin.yml b/.github/workflows/Pkg EdFi.Database.Admin.yml index 869b36e097..06f7e08ef5 100644 --- a/.github/workflows/Pkg EdFi.Database.Admin.yml +++ b/.github/workflows/Pkg EdFi.Database.Admin.yml @@ -6,8 +6,6 @@ name: Pkg EdFi.Database.Admin on: - pull_request: - branches: [main,'b-v*-patch*','feature-*'] push: branches: [main, 'b-v*-patch*','feature-*'] paths: @@ -115,9 +113,11 @@ jobs: nuget pack $AdminBACPACNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright © $(date +'%Y') Ed-Fi Alliance, LLC and Contributors" -NoPackageAnalysis -NoDefaultExcludes nuget pack $AdminPostgreSQLNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright © $(date +'%Y') Ed-Fi Alliance, LLC and Contributors" -NoPackageAnalysis -NoDefaultExcludes - name: Install-credential-handler + if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" shell: powershell - name: Publish Nuget package + if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} working-directory: ./Ed-Fi-ODS/ run: | .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Database.Admin.Standard.${{ matrix.StandardVersion }}" diff --git a/.github/workflows/Pkg EdFi.Database.Security.yml b/.github/workflows/Pkg EdFi.Database.Security.yml index ec1f340b7c..72b43cca0f 100644 --- a/.github/workflows/Pkg EdFi.Database.Security.yml +++ b/.github/workflows/Pkg EdFi.Database.Security.yml @@ -6,8 +6,6 @@ name: Pkg EdFi.Database.Security on: - pull_request: - branches: [main,'b-v*-patch*','feature-*'] push: branches: [main, 'b-v*-patch*','feature-*'] paths: @@ -115,9 +113,11 @@ jobs: nuget pack $SecurityBACPACNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright © $(date +'%Y') Ed-Fi Alliance, LLC and Contributors" -NoPackageAnalysis -NoDefaultExcludes nuget pack $SecurityPostgreSQLNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright © $(date +'%Y') Ed-Fi Alliance, LLC and Contributors" -NoPackageAnalysis -NoDefaultExcludes - name: Install-credential-handler + if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" shell: powershell - name: Publish Nuget package + if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} working-directory: ./Ed-Fi-ODS/ run: | .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Database.Security.Standard.${{ matrix.StandardVersion }}" diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml index a53e6396d7..26dc524c01 100644 --- a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -7,7 +7,7 @@ name: Pkg EdFi.ProjectTemplates.Installer on: pull_request: - branches: [main,'b-v*-patch*','feature-*'] + branches: [main, 'b-v*-patch*','feature-*'] push: branches: [main, 'b-v*-patch*','feature-*'] workflow_dispatch: @@ -112,9 +112,11 @@ jobs: run: | .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.nuspec" - name: Install-credential-handler + if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" shell: powershell - name: publish + if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} working-directory: ./Ed-Fi-ODS/ run: | .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" diff --git a/build.githubactions.ps1 b/build.githubactions.ps1 index 3dca062314..1b04313e8e 100644 --- a/build.githubactions.ps1 +++ b/build.githubactions.ps1 @@ -272,12 +272,13 @@ function InstallCredentialHandler { $packageFolder = Join-Path ([IO.Path]::GetTempPath()) 'Microsoft.NuGet.CredentialProvider/' if ($fileName.EndsWith('.zip')) { Write-Host "Extracting $fileName..." - + if (Test-Path $zipFilePath) { Expand-Archive -Force -Path $zipFilePath -DestinationPath $packageFolder } Copy-Item -Path $packageFolder\* -Destination "~/.nuget/" -Recurse -Force Write-Host "Extracted to: ~\.nuget\plugins\" -ForegroundColor Green } } + function StandardVersions { $standardProjectDirectory = Split-Path $Solution -Resolve