Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ODS-6561]Update VSIX installer for project templates #1185

Merged
merged 16 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/Pkg EdFi.Database.Admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +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' }}
working-directory: ./Ed-Fi-ODS/
run: |
.\build.githubactions.ps1 InstallCredentialHandler
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' }}
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 }}"
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/Pkg EdFi.Database.Security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,12 @@ 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
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/
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 }}"
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ concurrency:

env:
INFORMATIONAL_VERSION: "7.3"
BUILD_INCREMENTER: "-268"
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 }}"}]}'
Expand Down Expand Up @@ -112,13 +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' }}
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' }}
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"
Expand Down
22 changes: 10 additions & 12 deletions build.githubactions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -153,17 +156,13 @@ function Pack {
}
}
if ($NuspecFilePath -Like "*.nuspec" -and $null -ne $PackageName){
$params = @{
PackageDefinitionFile = $NuspecFilePath
Version = $version
PackageId = $PackageName
OutputDirectory = $packageOutput
BuildConfiguration = $Configuration
}

$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

& "$PSScriptRoot/../Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1"

New-Package @params | Out-Host
}
if ([string]::IsNullOrWhiteSpace($NuspecFilePath) -and $null -ne $PackageName){
Invoke-Execute {
Expand Down Expand Up @@ -273,12 +272,11 @@ 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 {
Expand Down
Loading