[ODS-6261] Added missing indexes to EdFi_Admin db (#642) #500
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-License-Identifier: Apache-2.0 | |
# Licensed to the Ed-Fi Alliance under one or more agreements. | |
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. | |
# See the LICENSE and NOTICES files in the project root for more information. | |
name: Pkg EdFi.Database.Security | |
on: | |
pull_request: | |
branches: | |
- main-6x | |
paths: | |
- '**.sql' | |
push: | |
branches: | |
- main | |
paths: | |
- '**.sql' | |
workflow_dispatch: | |
env: | |
INFORMATIONAL_VERSION: "6.2" | |
BUILD_INCREMENTER: "1" | |
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 }}"}]}' | |
CONFIGURATION: "Release" | |
HEAD_REF: ${{ GITHUB.HEAD_REF }} | |
REF_NAME: ${{ GITHUB.REF_NAME }} | |
REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Support longpaths | |
run: git config --system core.longpaths true | |
- name: Checkout Ed-Fi-ODS | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS | |
path: Ed-Fi-ODS/ | |
- name: Is pull request branch exists in Ed-Fi-ODS | |
working-directory: ./Ed-Fi-ODS/ | |
shell: pwsh | |
run: | | |
.\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "." | |
- name: Checkout Ed-Fi-ODS-Implementation | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation | |
path: Ed-Fi-ODS-Implementation/ | |
- name: Is pull request branch exists in Ed-Fi-ODS-Implementation | |
working-directory: ./Ed-Fi-ODS/ | |
shell: pwsh | |
run: | | |
./build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS-Implementation" | |
- name: Install sql-server-2019, sqlpackage, and postgres13 | |
shell: pwsh | |
run: | | |
choco install sql-server-2019 -y --params "'/IGNOREPENDINGREBOOT /IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=MSSQLSERVER /INSTANCENAME=MSSQLSERVER /TCPENABLED=1 /UPDATEENABLED=FALSE /FEATURES=SQL,Tools'" --execution-timeout=$installTimeout | |
choco install sqlpackage | |
choco install postgresql13 --params '/Password:postgres' | |
$confPath = "C:\Program Files\PostgreSQL\13\data\pg_hba.conf" | |
(Get-Content $confPath).Replace("scram-sha-256","trust") | Set-Content $confPath | |
Restart-Service postgresql-x64-13 | |
- name: Create Security Database | |
shell: pwsh | |
run: | | |
$ErrorActionPreference = 'Stop' | |
$PSVersionTable | |
. $env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/logistics/scripts/activities/build/create-database-package.ps1 -Output NugetPackages -DatabaseType Security -SQLPackage "C:\ProgramData\chocolatey\lib\sqlpackage\tools" | |
- name: Use NuGet | |
uses: nuget/setup-nuget@b2bc17b761a1d88cab755a776c7922eb26eefbfa # v1 | |
with: | |
nuget-version: '5.x' | |
- name: Create NuGet package | |
shell: pwsh | |
run: | | |
[int]$BuildCounter = "${{ github.run_number }}" | |
[int]$BuildIncrementer = "${{ env.BUILD_INCREMENTER }}" | |
[int]$newRevision = $BuildCounter + $BuildIncrementer | |
[string]$version = "${{env.INFORMATIONAL_VERSION}}"+ "." + $newRevision.ToString() | |
$packageOutput = "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/NugetPackages" | |
$SecurityNuspecFilePath = "$env:GITHUB_WORKSPACE/NugetPackages/EdFi.Database.Security.nuspec" | |
$SecurityBACPACNuspecFilePath = "$env:GITHUB_WORKSPACE/NugetPackages/EdFi.Database.Security.BACPAC.nuspec" | |
$SecurityPostgreSQLNuspecFilePath = "$env:GITHUB_WORKSPACE/NugetPackages/EdFi.Database.Security.PostgreSQL.nuspec" | |
nuget pack $SecurityNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright ©Ed-Fi Alliance, LLC. 2020" -NoPackageAnalysis -NoDefaultExcludes | |
nuget pack $SecurityBACPACNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright ©Ed-Fi Alliance, LLC. 2020" -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 ©Ed-Fi Alliance, LLC. 2020" -NoPackageAnalysis -NoDefaultExcludes | |
- name: Install-credential-handler | |
run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" | |
shell: pwsh | |
- name: Publish Nuget package | |
working-directory: ./Ed-Fi-ODS-Implementation/ | |
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" | |
./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" | |
./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.PostgreSQL" | |
shell: pwsh | |
- name: Upload EdFi.Database.Security Artifacts | |
if: success() | |
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 | |
with: | |
name: NugetPackages.Artifacts | |
path: ${{ github.workspace }}/NugetPackages/*.nupkg |