From 39164671b0c3b31dd7fbfc01fca099cdbecb4774 Mon Sep 17 00:00:00 2001 From: Vinaya Mayya Date: Tue, 27 Feb 2024 21:58:03 -0600 Subject: [PATCH] GitHub action builds for 5x --- .github/workflows/CodeQL Security Scan.yml | 81 ++++++ .../workflows/Dependencies Security Scan.yml | 38 +++ .github/workflows/InitDev Implementation.yml | 23 ++ .../Lib edFi.admin.dataaccess pullrequest.yml | 35 +++ .../workflows/Lib edFi.admin.dataaccess.yml | 49 ++++ .../workflows/Lib edFi.common pullrequest.yml | 31 +++ .github/workflows/Lib edFi.common.yml | 49 ++++ .../Lib edFi.loadtools pullrequest.yml | 32 +++ .github/workflows/Lib edFi.loadtools.yml | 65 +++++ .../Lib edFi.ods.api pullrequest .yml | 32 +++ .github/workflows/Lib edFi.ods.api.yml | 49 ++++ .../Lib edFi.ods.common pullrequest.yml | 33 +++ .github/workflows/Lib edFi.ods.common.yml | 49 ++++ ...b edFi.security.dataaccess pullrequest.yml | 34 +++ .../Lib edFi.security.dataaccess.yml | 49 ++++ .github/workflows/Pkg EdFi.Database.Admin.yml | 109 ++++++++ .../workflows/Pkg EdFi.Database.Security.yml | 110 ++++++++ .../Pkg EdFi.Ods.CodeGen pullrequest.yml | 100 +++++++ .github/workflows/Pkg EdFi.Ods.CodeGen.yml | 88 +++++++ ...g EdFi.Ods.Minimal.Template.PostgreSQL.yml | 113 ++++++++ ...i.Ods.Minimal.Template.TPDM.PostgreSQL.yml | 124 +++++++++ .../Pkg EdFi.Ods.Minimal.Template.TPDM.yml | 117 +++++++++ .../Pkg EdFi.Ods.Minimal.Template.yml | 111 ++++++++ ...EdFi.Ods.Populated.Template.PostgreSQL.yml | 113 ++++++++ ...Ods.Populated.Template.TPDM.PostgreSQL.yml | 121 +++++++++ .../Pkg EdFi.Ods.Populated.Template.TPDM.yml | 117 +++++++++ .../Pkg EdFi.Ods.Populated.Template.yml | 112 ++++++++ build.githubactions.ps1 | 246 ++++++++++++++++++ 28 files changed, 2230 insertions(+) create mode 100644 .github/workflows/CodeQL Security Scan.yml create mode 100644 .github/workflows/Dependencies Security Scan.yml create mode 100644 .github/workflows/InitDev Implementation.yml create mode 100644 .github/workflows/Lib edFi.admin.dataaccess pullrequest.yml create mode 100644 .github/workflows/Lib edFi.admin.dataaccess.yml create mode 100644 .github/workflows/Lib edFi.common pullrequest.yml create mode 100644 .github/workflows/Lib edFi.common.yml create mode 100644 .github/workflows/Lib edFi.loadtools pullrequest.yml create mode 100644 .github/workflows/Lib edFi.loadtools.yml create mode 100644 .github/workflows/Lib edFi.ods.api pullrequest .yml create mode 100644 .github/workflows/Lib edFi.ods.api.yml create mode 100644 .github/workflows/Lib edFi.ods.common pullrequest.yml create mode 100644 .github/workflows/Lib edFi.ods.common.yml create mode 100644 .github/workflows/Lib edFi.security.dataaccess pullrequest.yml create mode 100644 .github/workflows/Lib edFi.security.dataaccess.yml create mode 100644 .github/workflows/Pkg EdFi.Database.Admin.yml create mode 100644 .github/workflows/Pkg EdFi.Database.Security.yml create mode 100644 .github/workflows/Pkg EdFi.Ods.CodeGen pullrequest.yml create mode 100644 .github/workflows/Pkg EdFi.Ods.CodeGen.yml create mode 100644 .github/workflows/Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml create mode 100644 .github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml create mode 100644 .github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.yml create mode 100644 .github/workflows/Pkg EdFi.Ods.Minimal.Template.yml create mode 100644 .github/workflows/Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml create mode 100644 .github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml create mode 100644 .github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.yml create mode 100644 .github/workflows/Pkg EdFi.Ods.Populated.Template.yml create mode 100644 build.githubactions.ps1 diff --git a/.github/workflows/CodeQL Security Scan.yml b/.github/workflows/CodeQL Security Scan.yml new file mode 100644 index 0000000000..b2f0f00898 --- /dev/null +++ b/.github/workflows/CodeQL Security Scan.yml @@ -0,0 +1,81 @@ +# 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: CodeQL Security Scan Pull request + +on: + pull_request: + branches: [main-5x, 'b-v*-patch*','feature-*'] + push: + branches: [main-5x, 'b-v*-patch*','feature-*'] + +env: + INFORMATIONAL_VERSION: "5.4" + BUILD_INCREMENTER: "1" + CONFIGURATION: "Release" + HEAD_REF: ${{ GITHUB.HEAD_REF }} + REF_NAME: ${{ GITHUB.REF_NAME }} + REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} + +jobs: + analyze: + name: Analyze Code + runs-on: ubuntu-latest + + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + + steps: + - 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-Implementation/ + shell: pwsh + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "." + + - 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-Implementation/ + shell: pwsh + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS" + + - name: Initialize CodeQL + uses: github/codeql-action/init@df32e399139a3050671466d7d9b3cbacc1cfd034 # v2.15.2 + with: + languages: 'csharp' + + - name: CodeGen + working-directory: ./Ed-Fi-ODS-Implementation/ + shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + $PSVersionTable + . $env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1 + Invoke-CodeGen -Engine SQLServer -RepositoryRoot $env:GITHUB_WORKSPACE + + - name: build + shell: pwsh + working-directory: ./Ed-Fi-ODS-Implementation/ + run: | + .\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/Application/Ed-Fi-Ods.sln" + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@df32e399139a3050671466d7d9b3cbacc1cfd034 # v2.15.2 diff --git a/.github/workflows/Dependencies Security Scan.yml b/.github/workflows/Dependencies Security Scan.yml new file mode 100644 index 0000000000..dcd070e202 --- /dev/null +++ b/.github/workflows/Dependencies Security Scan.yml @@ -0,0 +1,38 @@ +# 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: Dependency Review Pull request + +on: + pull_request: + branches: [main-5x, 'b-v*-patch*','feature-*'] + +env: + HEAD_REF: ${{ GITHUB.HEAD_REF }} + REF_NAME: ${{ GITHUB.REF_NAME }} + REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} + +jobs: + scan-actions: + name: Scan Actions + uses: ed-fi-alliance-oss/ed-fi-actions/.github/workflows/repository-scanner.yml@main + + analyze-code: + name: Analyze Code Dependencies + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + + steps: + - name: Checkout Ed-Fi-ODS + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Dependency Review ("Dependabot on PR") + uses: actions/dependency-review-action@7bbfa034e752445ea40215fff1c3bf9597993d3f # v3.1.3 diff --git a/.github/workflows/InitDev Implementation.yml b/.github/workflows/InitDev Implementation.yml new file mode 100644 index 0000000000..913e36ad81 --- /dev/null +++ b/.github/workflows/InitDev Implementation.yml @@ -0,0 +1,23 @@ +name: Trigger InitDev workflows in Implementation repo + +on: + pull_request: + branches: [main-5x, 'b-v*-patch*','feature-*'] + workflow_dispatch: + +env: + EDFI_ODS_IMP_TOKEN: ${{ secrets.REPO_DISPATCH_TOKEN }} + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Dispatch to Implementation repo + uses: peter-evans/repository-dispatch@11ba7d3f32dc7cc919d1c43f1fec1c05260c26b5 # v2 + with: + token: ${{ env.EDFI_ODS_IMP_TOKEN }} + repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation + event-type: triggered-from-ods-repo + client-payload: '{"branch": "${{ GITHUB.HEAD_REF }}"}' diff --git a/.github/workflows/Lib edFi.admin.dataaccess pullrequest.yml b/.github/workflows/Lib edFi.admin.dataaccess pullrequest.yml new file mode 100644 index 0000000000..caf4daff70 --- /dev/null +++ b/.github/workflows/Lib edFi.admin.dataaccess pullrequest.yml @@ -0,0 +1,35 @@ +name: Lib EdFi.Admin.DataAccess Pull request build and test + +on: + workflow_dispatch: + pull_request: + branches: [main-5x, 'b-v*-patch*','feature-*'] + paths: + - Application/EdFi.Admin.DataAccess/**/* + - tests/EdFi.Admin.DataAccess.UnitTests/**/* + - Application/EdFi.Common/**/* + +env: + INFORMATIONAL_VERSION: "5.4" + BUILD_INCREMENTER: "1" + CONFIGURATION: "Release" + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - name: build + run: | + .\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Application/EdFi.Admin.DataAccess/EdFi.Admin.DataAccess.sln" -ProjectFile "Application/EdFi.Admin.DataAccess/EdFi.Admin.DataAccess.csproj" + shell: pwsh + - name: Run Unit tests + run: | + .\build.githubactions.ps1 test -Configuration ${{ env.CONFIGURATION }} -Solution "Application/EdFi.Admin.DataAccess/EdFi.Admin.DataAccess.sln" -ProjectFile "Application/EdFi.Admin.DataAccess/EdFi.Admin.DataAccess.csproj" + shell: pwsh diff --git a/.github/workflows/Lib edFi.admin.dataaccess.yml b/.github/workflows/Lib edFi.admin.dataaccess.yml new file mode 100644 index 0000000000..4e69ea4689 --- /dev/null +++ b/.github/workflows/Lib edFi.admin.dataaccess.yml @@ -0,0 +1,49 @@ +name: Lib EdFi.Admin.DataAccess + +on: + workflow_dispatch: + +env: + INFORMATIONAL_VERSION: "5.4" + BUILD_INCREMENTER: "1" + CONFIGURATION: "Release" + 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 }}"}]}' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - name: build + run: | + .\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Application/EdFi.Admin.DataAccess/EdFi.Admin.DataAccess.sln" -ProjectFile "Application/EdFi.Admin.DataAccess/EdFi.Admin.DataAccess.csproj" + shell: pwsh + - name: Run Unit tests + run: | + .\build.githubactions.ps1 test -Configuration ${{ env.CONFIGURATION }} -Solution "Application/EdFi.Admin.DataAccess/EdFi.Admin.DataAccess.sln" -ProjectFile "Application/EdFi.Admin.DataAccess/EdFi.Admin.DataAccess.csproj" + shell: pwsh + - name: pack + run: | + .\build.githubactions.ps1 pack -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Application/EdFi.Admin.DataAccess/EdFi.Admin.DataAccess.sln" -ProjectFile "Application/EdFi.Admin.DataAccess/EdFi.Admin.DataAccess.csproj" -PackageName "EdFi.Suite3.Admin.DataAccess" + shell: pwsh + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: pwsh + - name: publish + 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}} -Solution "Application/EdFi.Admin.DataAccess/EdFi.Admin.DataAccess.sln" -ProjectFile "Application/EdFi.Admin.DataAccess/EdFi.Admin.DataAccess.csproj" -PackageName "EdFi.Suite3.Admin.DataAccess" + shell: pwsh + - name: Upload EdFi.Suite3.Admin.DataAccess Artifacts + if: success() + uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 + with: + name: NugetPackages.Artifacts + path: ${{ github.workspace }}/NugetPackages/*.nupkg diff --git a/.github/workflows/Lib edFi.common pullrequest.yml b/.github/workflows/Lib edFi.common pullrequest.yml new file mode 100644 index 0000000000..6acfbebf93 --- /dev/null +++ b/.github/workflows/Lib edFi.common pullrequest.yml @@ -0,0 +1,31 @@ +name: Lib EdFi.Common Pull request build and test + +on: + workflow_dispatch: + pull_request: + branches: [main-5x, 'b-v*-patch*','feature-*'] + paths: + - Application/EdFi.Common/**/* + - tests/EdFi.Common.UnitTests/**/* + - tests/EdFi.TestFixture/**/* + +env: + INFORMATIONAL_VERSION: "5.4" + CONFIGURATION: "Release" + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: build + run: | + .\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -Solution "Application/EdFi.Common/EdFi.Common.sln" -ProjectFile "Application/EdFi.Common/EdFi.Common.csproj" + shell: pwsh + - name: Run Unit tests + run: | + .\build.githubactions.ps1 test -Configuration ${{ env.CONFIGURATION }} -Solution "Application/EdFi.Common/EdFi.Common.sln" -ProjectFile "Application/EdFi.Common/EdFi.Common.csproj" + shell: pwsh diff --git a/.github/workflows/Lib edFi.common.yml b/.github/workflows/Lib edFi.common.yml new file mode 100644 index 0000000000..deaf1de352 --- /dev/null +++ b/.github/workflows/Lib edFi.common.yml @@ -0,0 +1,49 @@ +name: Lib EdFi.Common + +on: + workflow_dispatch: + +env: + INFORMATIONAL_VERSION: "5.4" + BUILD_INCREMENTER: "1" + CONFIGURATION: "Release" + 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 }}"}]}' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - name: build + run: | + .\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Application/EdFi.Common/EdFi.Common.sln" -ProjectFile "Application/EdFi.Common/EdFi.Common.csproj" + shell: pwsh + - name: Run Unit tests + run: | + .\build.githubactions.ps1 test -Configuration ${{ env.CONFIGURATION }} -Solution "Application/EdFi.Common/EdFi.Common.sln" -ProjectFile "Application/EdFi.Common/EdFi.Common.csproj" + shell: pwsh + - name: pack + run: | + .\build.githubactions.ps1 pack -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Application/EdFi.Common/EdFi.Common.sln" -ProjectFile "Application/EdFi.Common/EdFi.Common.csproj" -PackageName "EdFi.Suite3.Common" + shell: pwsh + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: pwsh + - name: publish + 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}} -Solution "Application/EdFi.Common/EdFi.Common.sln" -ProjectFile "Application/EdFi.Common/EdFi.Common.csproj" -PackageName "EdFi.Suite3.Common" + shell: pwsh + - name: Upload EdFi.Common Artifacts + if: success() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: NugetPackages.Artifacts + path: ${{ github.workspace }}/NugetPackages/*.nupkg diff --git a/.github/workflows/Lib edFi.loadtools pullrequest.yml b/.github/workflows/Lib edFi.loadtools pullrequest.yml new file mode 100644 index 0000000000..489263dbda --- /dev/null +++ b/.github/workflows/Lib edFi.loadtools pullrequest.yml @@ -0,0 +1,32 @@ +name: Lib EdFi.LoadTools Pull request build and test + +on: + pull_request: + branches: [main-5x, 'b-v*-patch*','feature-*'] + paths: + - Utilities/DataLoading/**/* + +env: + INFORMATIONAL_VERSION: "5.4" + BUILD_INCREMENTER: "1" + CONFIGURATION: "Release" + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - name: build + run: | + .\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Utilities/DataLoading/LoadTools.sln" + shell: pwsh + - name: Run Unit tests + run: | + .\build.githubactions.ps1 test -Configuration ${{ env.CONFIGURATION }} -Solution "Utilities/DataLoading/LoadTools.sln" -TestFilter "RunManually" + shell: pwsh diff --git a/.github/workflows/Lib edFi.loadtools.yml b/.github/workflows/Lib edFi.loadtools.yml new file mode 100644 index 0000000000..ecd02c1141 --- /dev/null +++ b/.github/workflows/Lib edFi.loadtools.yml @@ -0,0 +1,65 @@ +name: Lib EdFi.LoadTools + +on: + workflow_dispatch: + +env: + INFORMATIONAL_VERSION: "5.4" + BUILD_INCREMENTER: "1" + CONFIGURATION: "Release" + 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 }}"}]}' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - name: build + run: | + .\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Utilities/DataLoading/LoadTools.sln" + shell: pwsh + - name: Run Unit tests + run: | + .\build.githubactions.ps1 test -Configuration ${{ env.CONFIGURATION }} -Solution "Utilities/DataLoading/LoadTools.sln" -TestFilter "RunManually" + shell: pwsh + - name: pack load tools + run: | + .\build.githubactions.ps1 pack -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Utilities/DataLoading/LoadTools.sln" -ProjectFile "Utilities/DataLoading/EdFi.LoadTools/EdFi.LoadTools.csproj" -PackageName "EdFi.Suite3.LoadTools" + shell: pwsh + - name: pack bulk load client + run: | + .\build.githubactions.ps1 pack -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Utilities/DataLoading/LoadTools.sln" -ProjectFile "Utilities/DataLoading/EdFi.BulkLoadClient.Console/EdFi.BulkLoadClient.Console.csproj" -PackageName "EdFi.Suite3.BulkLoadClient.Console" + shell: pwsh + - name: pack smoke test console + run: | + .\build.githubactions.ps1 pack -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Utilities/DataLoading/LoadTools.sln" -ProjectFile "Utilities/DataLoading/EdFi.SmokeTest.Console/EdFi.SmokeTest.Console.csproj" -PackageName "EdFi.Suite3.SmokeTest.Console" + shell: pwsh + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: pwsh + - name: publish load tools + 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}} -Solution "Utilities/DataLoading/LoadTools.sln" -ProjectFile "Ed-Fi-ODS/Utilities/DataLoading/EdFi.LoadTools/EdFi.LoadTools.csproj" -PackageName "EdFi.Suite3.LoadTools" + shell: pwsh + - name: publish bulk load client + 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}} -Solution "Utilities/DataLoading/LoadTools.sln" -ProjectFile "Ed-Fi-ODS/Utilities/DataLoading/EdFi.BulkLoadClient.Console/EdFi.BulkLoadClient.Console.csproj" -PackageName "EdFi.Suite3.BulkLoadClient.Console" + shell: pwsh + - name: publish smoke test console + 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}} -Solution "Utilities/DataLoading/LoadTools.sln" -ProjectFile "Ed-Fi-ODS/Utilities/DataLoading/EdFi.SmokeTest.Console/EdFi.SmokeTest.Console.csproj" -PackageName "EdFi.Suite3.SmokeTest.Console" + shell: pwsh + - name: Upload EdFi.LoadTools Artifacts + if: success() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: NugetPackages.Artifacts + path: ${{ github.workspace }}/NugetPackages/*.nupkg diff --git a/.github/workflows/Lib edFi.ods.api pullrequest .yml b/.github/workflows/Lib edFi.ods.api pullrequest .yml new file mode 100644 index 0000000000..167ce5aa89 --- /dev/null +++ b/.github/workflows/Lib edFi.ods.api pullrequest .yml @@ -0,0 +1,32 @@ +name: Lib EdFi.Ods.Api Pull request build and test + +on: + pull_request: + branches: [main-5x, 'b-v*-patch*','feature-*'] + paths: + - Application/EdFi.Ods.Api/**/* + - Application/EdFi.Ods.Common/**/* + +env: + INFORMATIONAL_VERSION: "5.4" + CONFIGURATION: "Release" + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - name: build + run: | + .\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -Solution "Application/EdFi.Ods.Api/EdFi.Ods.Api.sln" -ProjectFile "Application/EdFi.Ods.Api/EdFi.Ods.Api.csproj" + shell: pwsh + - name: Run Unit tests + run: | + .\build.githubactions.ps1 test -Configuration ${{ env.CONFIGURATION }} -Solution "Application/EdFi.Ods.Api/EdFi.Ods.Api.sln" -ProjectFile "Application/EdFi.Ods.Api/EdFi.Ods.Api.csproj" + shell: pwsh diff --git a/.github/workflows/Lib edFi.ods.api.yml b/.github/workflows/Lib edFi.ods.api.yml new file mode 100644 index 0000000000..639b3c8c76 --- /dev/null +++ b/.github/workflows/Lib edFi.ods.api.yml @@ -0,0 +1,49 @@ +name: Lib EdFi.Ods.Api + +on: + workflow_dispatch: + +env: + INFORMATIONAL_VERSION: "5.4" + BUILD_INCREMENTER: "1" + CONFIGURATION: "Release" + 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 }}"}]}' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - name: build + run: | + .\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Application/EdFi.Ods.Api/EdFi.Ods.Api.sln" -ProjectFile "Application/EdFi.Ods.Api/EdFi.Ods.Api.csproj" + shell: pwsh + - name: Run Unit tests + run: | + .\build.githubactions.ps1 test -Configuration ${{ env.CONFIGURATION }} -Solution "Application/EdFi.Ods.Api/EdFi.Ods.Api.sln" -ProjectFile "Application/EdFi.Ods.Api/EdFi.Ods.Api.csproj" + shell: pwsh + - name: pack + run: | + .\build.githubactions.ps1 pack -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Application/EdFi.Ods.Api/EdFi.Ods.Api.sln" -ProjectFile "Application/EdFi.Ods.Api/EdFi.Ods.Api.csproj" -PackageName "EdFi.Suite3.Ods.Api" + shell: pwsh + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: pwsh + - name: publish + 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}} -Solution "Application/EdFi.Ods.Api/EdFi.Ods.Api.sln" -ProjectFile "Application/EdFi.Ods.Api/EdFi.Ods.Api.csproj" -PackageName "EdFi.Suite3.Ods.Api" + shell: pwsh + - name: Upload EdFi.Ods.Api Artifacts + if: success() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: NugetPackages.Artifacts + path: ${{ github.workspace }}/NugetPackages/*.* diff --git a/.github/workflows/Lib edFi.ods.common pullrequest.yml b/.github/workflows/Lib edFi.ods.common pullrequest.yml new file mode 100644 index 0000000000..07dbba7c7c --- /dev/null +++ b/.github/workflows/Lib edFi.ods.common pullrequest.yml @@ -0,0 +1,33 @@ +name: Lib EdFi.Ods.Common Pull request build and test + +on: + pull_request: + branches: [main-5x, 'b-v*-patch*','feature-*'] + paths: + - Application/EdFi.Ods.Common/**/* + - tests/EdFi.Common.UnitTests/**/* + - tests/EdFi.TestFixture/**/* + +env: + INFORMATIONAL_VERSION: "6.1" + CONFIGURATION: "Release" + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - name: build + run: | + .\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -Solution "Application/EdFi.Ods.Common/EdFi.Ods.Common.sln" -ProjectFile "Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj" + shell: pwsh + - name: Run Unit tests + run: | + .\build.githubactions.ps1 test -Configuration ${{ env.CONFIGURATION }} -Solution "Application/EdFi.Ods.Common/EdFi.Ods.Common.sln" -ProjectFile "Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj" + shell: pwsh diff --git a/.github/workflows/Lib edFi.ods.common.yml b/.github/workflows/Lib edFi.ods.common.yml new file mode 100644 index 0000000000..10cbde47f8 --- /dev/null +++ b/.github/workflows/Lib edFi.ods.common.yml @@ -0,0 +1,49 @@ +name: Lib EdFi.Ods.Common + +on: + workflow_dispatch: + +env: + INFORMATIONAL_VERSION: "5.4" + BUILD_INCREMENTER: "1" + CONFIGURATION: "Release" + 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 }}"}]}' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - name: build + run: | + .\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Application/EdFi.Ods.Common/EdFi.Ods.Common.sln" -ProjectFile "Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj" + shell: pwsh + - name: Run Unit tests + run: | + .\build.githubactions.ps1 test -Configuration ${{ env.CONFIGURATION }} -Solution "Application/EdFi.Ods.Common/EdFi.Ods.Common.sln" -ProjectFile "application/EdFi.Ods.Common/EdFi.Ods.Common.csproj" + shell: pwsh + - name: pack + run: | + .\build.githubactions.ps1 pack -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Application/EdFi.Ods.Common/EdFi.Ods.Common.sln" -ProjectFile "Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj" -PackageName "EdFi.Suite3.Ods.Common" + shell: pwsh + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: pwsh + - name: publish + 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}} -Solution "Application/EdFi.Ods.Common/EdFi.Ods.Common.sln" -ProjectFile "Application/EdFi.Ods.Common/EdFi.Ods.Common.csproj" -PackageName "EdFi.Suite3.Ods.Common" + shell: pwsh + - name: Upload EdFi.Ods.Common Artifacts + if: success() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: NugetPackages.Artifacts + path: ${{ github.workspace }}/NugetPackages/*.* diff --git a/.github/workflows/Lib edFi.security.dataaccess pullrequest.yml b/.github/workflows/Lib edFi.security.dataaccess pullrequest.yml new file mode 100644 index 0000000000..cebd326444 --- /dev/null +++ b/.github/workflows/Lib edFi.security.dataaccess pullrequest.yml @@ -0,0 +1,34 @@ +name: Lib EdFi.Security.DataAccess Pull request build and test + +on: + pull_request: + branches: [main-5x, 'b-v*-patch*','feature-*'] + paths: + - Application/EdFi.Security.DataAccess/**/* + - tests/EdFi.Security.DataAccess.UnitTests/**/* + - Application/EdFi.Common/**/* + +env: + INFORMATIONAL_VERSION: "5.4" + BUILD_INCREMENTER: "1" + CONFIGURATION: "Release" + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - name: build + run: | + .\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Application/EdFi.Security.DataAccess/EdFi.Security.DataAccess.sln" -ProjectFile "Application/EdFi.Security.DataAccess/EdFi.Security.DataAccess.csproj" + shell: pwsh + - name: Run Unit tests + run: | + .\build.githubactions.ps1 test -Configuration ${{ env.CONFIGURATION }} -Solution "Application/EdFi.Security.DataAccess/EdFi.Security.DataAccess.sln" -ProjectFile "Application/EdFi.Security.DataAccess/EdFi.Security.DataAccess.csproj" + shell: pwsh diff --git a/.github/workflows/Lib edFi.security.dataaccess.yml b/.github/workflows/Lib edFi.security.dataaccess.yml new file mode 100644 index 0000000000..d507f4b40e --- /dev/null +++ b/.github/workflows/Lib edFi.security.dataaccess.yml @@ -0,0 +1,49 @@ +name: Lib EdFi.Security.DataAccess + +on: + workflow_dispatch: + +env: + INFORMATIONAL_VERSION: "5.4" + BUILD_INCREMENTER: "1" + CONFIGURATION: "Release" + 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 }}"}]}' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - name: build + run: | + .\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Application/EdFi.Security.DataAccess/EdFi.Security.DataAccess.sln" -ProjectFile "Application/EdFi.Security.DataAccess/EdFi.Security.DataAccess.csproj" + shell: pwsh + - name: Run Unit tests + run: | + .\build.githubactions.ps1 test -Configuration ${{ env.CONFIGURATION }} -Solution "Application/EdFi.Security.DataAccess/EdFi.Security.DataAccess.sln" -ProjectFile "Application/EdFi.Security.DataAccess/EdFi.Security.DataAccess.csproj" + shell: pwsh + - name: pack + run: | + .\build.githubactions.ps1 pack -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "Application/EdFi.Security.DataAccess/EdFi.Security.DataAccess.sln" -ProjectFile "Application/EdFi.Security.DataAccess/EdFi.Security.DataAccess.csproj" -PackageName "EdFi.Suite3.Security.DataAccess" + shell: pwsh + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: pwsh + - name: publish + 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}} -Solution "Application/EdFi.Security.DataAccess/EdFi.Security.DataAccess.sln" -ProjectFile "Application/EdFi.Security.DataAccess/EdFi.Security.DataAccess.csproj" -PackageName "EdFi.Suite3.Security.DataAccess" + shell: pwsh + - name: Upload EdFi.Suite3.Security.DataAccess Artifacts + if: success() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: NugetPackages.Artifacts + path: ${{ github.workspace }}/NugetPackages/*.nupkg diff --git a/.github/workflows/Pkg EdFi.Database.Admin.yml b/.github/workflows/Pkg EdFi.Database.Admin.yml new file mode 100644 index 0000000000..bc72a6f147 --- /dev/null +++ b/.github/workflows/Pkg EdFi.Database.Admin.yml @@ -0,0 +1,109 @@ +# 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.Admin + +on: + pull_request: + branches: [main-5x, 'b-v*-patch*','feature-*'] + paths: + - '**.sql' + push: + branches: [main-5x, 'b-v*-patch*','feature-*'] + paths: + - '**.sql' + workflow_dispatch: + +env: + INFORMATIONAL_VERSION: "5.4" + 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: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - 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 Admin 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 Admin -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/NugetPackages" + $AdminNuspecFilePath = "$env:GITHUB_WORKSPACE/NugetPackages/EdFi.Database.Admin.nuspec" + $AdminBACPACNuspecFilePath = "$env:GITHUB_WORKSPACE/NugetPackages/EdFi.Database.Admin.BACPAC.nuspec" + $AdminPostgreSQLNuspecFilePath = "$env:GITHUB_WORKSPACE/NugetPackages/EdFi.Database.Admin.PostgreSQL.nuspec" + nuget pack $AdminNuspecFilePath -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 $AdminBACPACNuspecFilePath -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 $AdminPostgreSQLNuspecFilePath -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/ + 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" + ./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.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.Admin.PostgreSQL" + - name: Upload EdFi.Database.Admin Artifacts + if: success() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: NugetPackages.Artifacts + path: ${{ github.workspace }}/NugetPackages/*.nupkg diff --git a/.github/workflows/Pkg EdFi.Database.Security.yml b/.github/workflows/Pkg EdFi.Database.Security.yml new file mode 100644 index 0000000000..61ad9baa1f --- /dev/null +++ b/.github/workflows/Pkg EdFi.Database.Security.yml @@ -0,0 +1,110 @@ +# 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-5x, 'b-v*-patch*','feature-*'] + paths: + - '**.sql' + push: + branches: [main-5x, 'b-v*-patch*','feature-*'] + paths: + - '**.sql' + workflow_dispatch: + +env: + INFORMATIONAL_VERSION: "5.4" + 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: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - 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 diff --git a/.github/workflows/Pkg EdFi.Ods.CodeGen pullrequest.yml b/.github/workflows/Pkg EdFi.Ods.CodeGen pullrequest.yml new file mode 100644 index 0000000000..c4e12e42eb --- /dev/null +++ b/.github/workflows/Pkg EdFi.Ods.CodeGen pullrequest.yml @@ -0,0 +1,100 @@ +# 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.Ods.CodeGen Pull Request Build and Test + +on: + pull_request: + branches: [main-5x, 'b-v*-patch*','feature-*'] + paths: + - Utilities/CodeGeneration/**/* + - Application/EdFi.Common/**/* + +env: + # These vars are used by `build.githubactions.ps1 CheckoutBranch` + REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} + HEAD_REF: ${{ GITHUB.HEAD_REF }} + REF_NAME: ${{ GITHUB.REF_NAME }} + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - name: Check out Ed-Fi-ODS + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + path: Ed-Fi-ODS/ + - name: Build Code Generation + working-directory: ./Ed-Fi-ODS/Utilities/CodeGeneration + run: | + dotnet build --configuration Release + + - name: Run Unit Tests + working-directory: ./Ed-Fi-ODS/Utilities/CodeGeneration + run: | + dotnet test --filter FullyQualifiedName~UnitTests --logger "trx;LogFileName=unit-tests.trx" --logger "console;verbosity=detailed" + + - name: Upload Unit Test Results + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + if: always() + with: + name: unit-tests + path: ./Ed-Fi-ODS/Utilities/CodeGeneration/EdFi.Ods.CodeGen.Tests/TestResults/unit-tests.trx + retention-days: 5 + if-no-files-found: warn + + # Integration tests require presence of the `Ed-Fi-ODS-Implementation` and `Ed-Fi-Extensions` repositories + - name: Check out 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: Confirm 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: Check out Ed-Fi-ODS-Extensions + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-Extensions + path: Ed-Fi-Extensions + + - name: Confirm Branch Exists in Ed-Fi-Extensions + working-directory: ./Ed-Fi-ODS/ + shell: pwsh + run: | + ./build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-Extensions" + + - name: Create Soft Link to Extensions + # For some reason, the integration tests when running in GitHub end up + # looking for the Extensions under Ed-Fi-ODS/Ed-Fi-ODS/Ed-Fi-Extensions, + # instead of looking in Ed-Fi-ODS/Ed-Fi-Extensions. Try resolving this + # by creating a Unix soft link to the directory. + working-directory: ./Ed-Fi-ODS/ + run: | + ln -s ../Ed-Fi-Extensions . + + - name: Run Integration Tests + working-directory: ./Ed-Fi-ODS/Utilities/CodeGeneration + run: | + dotnet test --filter FullyQualifiedName~IntegrationTests --logger "trx;LogFileName=integration-tests.trx" --logger "console;verbosity=detailed" + + - name: Upload Integration Test Results + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + if: always() + with: + name: integration-tests + path: ./Ed-Fi-ODS/Utilities/CodeGeneration/EdFi.Ods.CodeGen.Tests/TestResults/integration-tests.trx + retention-days: 5 + if-no-files-found: warn + diff --git a/.github/workflows/Pkg EdFi.Ods.CodeGen.yml b/.github/workflows/Pkg EdFi.Ods.CodeGen.yml new file mode 100644 index 0000000000..349079841a --- /dev/null +++ b/.github/workflows/Pkg EdFi.Ods.CodeGen.yml @@ -0,0 +1,88 @@ +name: Pkg EdFi.Ods.CodeGen + +on: + pull_request: + branches: [main-5x, 'b-v*-patch*','feature-*'] + push: + branches: [main-5x, 'b-v*-patch*','feature-*'] + paths: + - Utilities/CodeGeneration/**/* + - Application/EdFi.Common/**/* + workflow_dispatch: + +env: + INFORMATIONAL_VERSION: "5.4" + BUILD_INCREMENTER: "1" + CONFIGURATION: "Release" + 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 }}"}]}' + REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} + HEAD_REF: ${{ GITHUB.HEAD_REF }} + REF_NAME: ${{ GITHUB.REF_NAME }} + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - 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: 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: Checkout Ed-Fi-Extensions + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-Extensions + path: Ed-Fi-Extensions/ + + - name: Is pull request branch exists in Ed-Fi-Extensions + working-directory: ./Ed-Fi-ODS/ + shell: pwsh + run: | + ./build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-Extensions" + + - name: build + working-directory: ./Ed-Fi-ODS/ + run: | + .\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -Solution "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/CodeGeneration/EdFi.Ods.CodeGen.sln" + shell: pwsh + + - name: pack codegen + working-directory: ./Ed-Fi-ODS/ + run: | + .\build.githubactions.ps1 pack -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -ProjectFile "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/CodeGeneration/EdFi.Ods.CodeGen/EdFi.Ods.CodeGen.csproj" -PackageName "EdFi.Suite3.Ods.CodeGen" + shell: pwsh + + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: pwsh + + - name: publish codegen + 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/CodeGeneration/EdFi.Ods.CodeGen/EdFi.Ods.CodeGen.csproj" -PackageName "EdFi.Suite3.Ods.CodeGen" + shell: pwsh + + - name: Upload EdFi.Ods.CodeGen NugetPackage + if: success() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: NugetPackage.Artifacts + path: ${{ github.workspace }}/Ed-Fi-ODS/NugetPackages/*.nupkg diff --git a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml new file mode 100644 index 0000000000..40401a1fa2 --- /dev/null +++ b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml @@ -0,0 +1,113 @@ +# 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.Ods.Minimal.Template.PostgreSQL + +on: + push: + branches: [main-5x, 'b-v*-patch*','feature-*'] + workflow_dispatch: + repository_dispatch: + types: [triggered-from-implementation-repo ,triggered-from-datastandard-repo] + +env: + EDFI_STANDARD_REFERENCE: "v4.0.0" + INFORMATIONAL_VERSION: "5.4" + 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" + REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} + HEAD_REF: ${{ GITHUB.HEAD_REF }} + REF_NAME: ${{ GITHUB.REF_NAME }} + +jobs: + build: + + runs-on: windows-latest + + steps: + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - 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: 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: Checkout Ed-Fi-ODS-Standard + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-Standard + path: Ed-Fi-Standard/ + ref: ${{ env.EDFI_STANDARD_REFERENCE }} + - name: Is pull request branch exists in Ed-Fi-Standard + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-Standard" + - name: Is pull request branch exists in Ed-Fi-ODS-Implementation + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS-Implementation" + - name: Install Postgres13 + shell: pwsh + run: | + 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: Initialize-DevelopmentEnvironment + working-directory: ./Ed-Fi-ODS-Implementation/ + run: | + $ErrorActionPreference = 'Stop' + [Environment]::SetEnvironmentVariable('msbuild_buildConfiguration', '${{ env.CONFIGURATION }}') + $PSVersionTable + . $env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1 + Initialize-DevelopmentEnvironment -NoCredentials -NoDeploy -Engine PostgreSQL + shell: powershell + - name: Remove Plug-Ins + working-directory: ./Ed-Fi-ODS-Implementation/ + run: | + $ErrorActionPreference = 'Stop' + rm -R "./Plugin/EdFi.*" + shell: powershell + - name: Create Database Template (no extensions) + working-directory: ./ + run: | + $ErrorActionPreference = 'Stop' + [Environment]::SetEnvironmentVariable('msbuild_buildConfiguration', '${{ env.CONFIGURATION }}') + Import-Module -Force -Scope Global "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Modules/create-minimal-template.psm1" + Initialize-MinimalTemplate -samplePath "./Ed-Fi-Standard/Descriptors" -noExtensions -Engine PostgreSQL + shell: powershell + - name: pack + working-directory: ./Ed-Fi-ODS/ + run: | + .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Database/EdFi.Ods.Minimal.Template.PostgreSQL.nuspec" -PackageName "EdFi.Suite3.Ods.Minimal.Template.PostgreSQL" + shell: powershell + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: powershell + - 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.Ods.Minimal.Template.PostgreSQL" + shell: powershell + - name: Upload EdFi.Ods.Minimal.Template Artifacts + if: success() || failure() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: NugetPackages.Artifacts + path: ${{ github.workspace }}/Ed-Fi-ODS/NugetPackages/EdFi.Suite3.Ods.Minimal.Template.PostgreSQL*.nupkg diff --git a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml new file mode 100644 index 0000000000..3b8d6d40ef --- /dev/null +++ b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.PostgreSQL.yml @@ -0,0 +1,124 @@ +# 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.Ods.Minimal.Template.TPDM.PostgreSQL + +on: + push: + branches: [main-5x, 'b-v*-patch*','feature-*'] + workflow_dispatch: + repository_dispatch: + types: [triggered-from-implementation-repo ,triggered-from-datastandard-repo ,triggered-from-tpdmartifacts-repo] + +env: + EDFI_STANDARD_REFERENCE: "v4.0.0" + TPDM_ARTIFACT_REFERENCE: "Data-Standard-v4.0.0" + INFORMATIONAL_VERSION: "5.4" + 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" + REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} + HEAD_REF: ${{ GITHUB.HEAD_REF }} + REF_NAME: ${{ GITHUB.REF_NAME }} + +jobs: + build: + + runs-on: windows-latest + + steps: + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - 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: 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: Checkout Ed-Fi-ODS-Standard + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-Standard + path: Ed-Fi-Standard/ + ref: ${{ env.EDFI_STANDARD_REFERENCE }} + - name: Is pull request branch exists in Ed-Fi-Standard + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-Standard" + - name: Checkout Ed-Fi-TPDM-Artifacts + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-TPDM-Artifacts + path: Ed-Fi-TPDM-Artifacts/ + ref: ${{ env.TPDM_ARTIFACT_REFERENCE }} + - name: Is pull request branch exists in Ed-Fi-TPDM-Artifacts + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-TPDM-Artifacts" + - name: Is pull request branch exists in Ed-Fi-ODS-Implementation + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS-Implementation" + - name: Install Postgres13 + shell: pwsh + run: | + 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: Initialize-DevelopmentEnvironment + working-directory: ./Ed-Fi-ODS-Implementation/ + run: | + $ErrorActionPreference = 'Stop' + [Environment]::SetEnvironmentVariable('msbuild_buildConfiguration', '${{ env.CONFIGURATION }}') + + $PSVersionTable + . $env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1 + + Initialize-DevelopmentEnvironment -UsePlugins -NoDeploy -Engine PostgreSQL + shell: powershell + - name: Create Database Template (no extensions) + working-directory: ./ + run: | + $ErrorActionPreference = 'Stop' + [Environment]::SetEnvironmentVariable('msbuild_buildConfiguration', '${{ env.CONFIGURATION }}') + Import-Module -Force -Scope Global "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Modules/create-tpdm-minimal-template.psm1" + Initialize-TPDMMinimalTemplate -Engine PostgreSQL + shell: powershell + - name: pack + working-directory: ./Ed-Fi-ODS/ + run: | + .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Database/EdFi.Ods.Minimal.Template.TPDM.Core.PostgreSQL.nuspec" -PackageName "EdFi.Suite3.Ods.Minimal.Template.TPDM.Core.PostgreSQL" + shell: powershell + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: powershell + - 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.Ods.Minimal.Template.TPDM.Core.PostgreSQL" + shell: powershell + - name: Upload EdFi.Ods.Minimal.Template.TPDM.PostgreSQL Artifacts + if: success() || failure() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: NugetPackages.Artifacts + path: | + ${{ github.workspace }}/Ed-Fi-ODS/NugetPackages/EdFi.Suite3.Ods.Minimal.Template.TPDM.Core.PostgreSQL*.nupkg + ${{ github.workspace }}/Ed-Fi-ODS/Utilities/DataLoading/EdFi.BulkLoadClient.Console/bin/**/logfile*.* + ${{ github.workspace }}/Ed-Fi-ODS-Implementation/Application/EdFi.Ods.Api.IntegrationTestHarness/bin/**/TestHarnessLog*.* diff --git a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.yml b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.yml new file mode 100644 index 0000000000..b417d16105 --- /dev/null +++ b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.TPDM.yml @@ -0,0 +1,117 @@ +# 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.Ods.Minimal.Template.TPDM + +on: + push: + branches: [main-5x, 'b-v*-patch*','feature-*'] + workflow_dispatch: + repository_dispatch: + types: [triggered-from-implementation-repo ,triggered-from-datastandard-repo ,triggered-from-tpdmartifacts-repo] + +env: + EDFI_STANDARD_REFERENCE: "v4.0.0" + TPDM_ARTIFACT_REFERENCE: "Data-Standard-v4.0.0" + INFORMATIONAL_VERSION: "5.4" + 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" + REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} + HEAD_REF: ${{ GITHUB.HEAD_REF }} + REF_NAME: ${{ GITHUB.REF_NAME }} +jobs: + build: + + runs-on: windows-latest + + steps: + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - 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: 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: Checkout Ed-Fi-ODS-Standard + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-Standard + path: Ed-Fi-Standard/ + ref: ${{ env.EDFI_STANDARD_REFERENCE }} + - name: Is pull request branch exists in Ed-Fi-Standard + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-Standard" + - name: Checkout Ed-Fi-TPDM-Artifacts + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-TPDM-Artifacts + path: Ed-Fi-TPDM-Artifacts/ + ref: ${{ env.TPDM_ARTIFACT_REFERENCE }} + - name: Is pull request branch exists in Ed-Fi-TPDM-Artifacts + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-TPDM-Artifacts" + - name: Is pull request branch exists in Ed-Fi-ODS-Implementation + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS-Implementation" + - name: Install sql-server-2019 & sqlpackage + shell: powershell + 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 + - name: Initialize-DevelopmentEnvironment + working-directory: ./Ed-Fi-ODS-Implementation/ + run: | + $ErrorActionPreference = 'Stop' + $PSVersionTable + . $env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1 + Initialize-DevelopmentEnvironment -UsePlugins -NoDeploy + shell: powershell + - name: Create Database Template (no extensions) + working-directory: ./ + run: | + $ErrorActionPreference = 'Stop' + Import-Module -Force -Scope Global "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Modules/create-tpdm-minimal-template.psm1" + Initialize-TPDMMinimalTemplate + shell: powershell + - name: pack + working-directory: ./Ed-Fi-ODS/ + run: | + .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Database/EdFi.Ods.Minimal.Template.TPDM.Core.nuspec" -PackageName "EdFi.Suite3.Ods.Minimal.Template.TPDM.Core" + shell: powershell + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: powershell + - 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.Ods.Minimal.Template.TPDM.Core" + shell: powershell + - name: Upload EdFi.Ods.Minimal.Template.TPDM.Core Artifacts + if: success() || failure() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: EdFi.Ods.Minimal.Template.TPDM.Core.Artifacts + path: | + ${{ github.workspace }}/Ed-Fi-ODS/NugetPackages/EdFi.Suite3.Ods.Minimal.Template.TPDM.Core*.nupkg + ${{ github.workspace }}/Ed-Fi-ODS/Utilities/DataLoading/EdFi.BulkLoadClient.Console/bin/**/logfile*.* + ${{ github.workspace }}/Ed-Fi-ODS-Implementation/Application/EdFi.Ods.Api.IntegrationTestHarness/bin/**/TestHarnessLog*.* diff --git a/.github/workflows/Pkg EdFi.Ods.Minimal.Template.yml b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.yml new file mode 100644 index 0000000000..17b1aadcd0 --- /dev/null +++ b/.github/workflows/Pkg EdFi.Ods.Minimal.Template.yml @@ -0,0 +1,111 @@ +# 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.Ods.Minimal.Template + +on: + push: + branches: [main-5x, 'b-v*-patch*','feature-*'] + workflow_dispatch: + repository_dispatch: + types: [triggered-from-implementation-repo ,triggered-from-datastandard-repo] + +env: + EDFI_STANDARD_REFERENCE: "v4.0.0" + INFORMATIONAL_VERSION: "5.4" + 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" + REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} + HEAD_REF: ${{ GITHUB.HEAD_REF }} + REF_NAME: ${{ GITHUB.REF_NAME }} + +jobs: + build: + + runs-on: windows-latest + + steps: + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - 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: 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: Checkout Ed-Fi-ODS-Standard + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-Standard + path: Ed-Fi-Standard/ + ref: ${{ env.EDFI_STANDARD_REFERENCE }} + - name: Is pull request branch exists in Ed-Fi-Standard + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-Standard" + - name: Is pull request branch exists in Ed-Fi-ODS-Implementation + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS-Implementation" + - name: Install sql-server-2019 & sqlpackage + shell: powershell + 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 + - name: Initialize-DevelopmentEnvironment + working-directory: ./Ed-Fi-ODS-Implementation/ + run: | + $ErrorActionPreference = 'Stop' + [Environment]::SetEnvironmentVariable('msbuild_buildConfiguration', '${{ env.CONFIGURATION }}') + $PSVersionTable + . $env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1 + Initialize-DevelopmentEnvironment -NoCredentials -NoDeploy + shell: powershell + - name: Remove Plug-Ins + working-directory: ./Ed-Fi-ODS-Implementation/ + run: | + $ErrorActionPreference = 'Stop' + rm -R "./Plugin/EdFi.*" + shell: powershell + - name: Create Database Template (no extensions) + working-directory: ./ + run: | + $ErrorActionPreference = 'Stop' + [Environment]::SetEnvironmentVariable('msbuild_buildConfiguration', '${{ env.CONFIGURATION }}') + Import-Module -Force -Scope Global "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Modules/create-minimal-template.psm1" + Initialize-MinimalTemplate -samplePath './Ed-Fi-Standard/Descriptors' -noExtensions + shell: powershell + - name: pack + working-directory: ./Ed-Fi-ODS/ + run: | + .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Database/EdFi.Ods.Minimal.Template.nuspec" -PackageName "EdFi.Suite3.Ods.Minimal.Template" + shell: powershell + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: powershell + - 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.Ods.Minimal.Template" + shell: powershell + - name: Upload EdFi.Ods.Minimal.Template Artifacts + if: success() || failure() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: NugetPackages.Artifacts + path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/*.* diff --git a/.github/workflows/Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml b/.github/workflows/Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml new file mode 100644 index 0000000000..5af655131c --- /dev/null +++ b/.github/workflows/Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml @@ -0,0 +1,113 @@ +# 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.Ods.Populated.Template.PostgreSQL + +on: + push: + branches: [main-5x, 'b-v*-patch*','feature-*'] + workflow_dispatch: + repository_dispatch: + types: [triggered-from-implementation-repo ,triggered-from-datastandard-repo] + +env: + EDFI_STANDARD_REFERENCE: "v4.0.0" + INFORMATIONAL_VERSION: "5.4" + 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" + REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} + HEAD_REF: ${{ GITHUB.HEAD_REF }} + REF_NAME: ${{ GITHUB.REF_NAME }} + +jobs: + build: + + runs-on: windows-latest + + steps: + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - 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: 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: Checkout Ed-Fi-ODS-Standard + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-Standard + path: Ed-Fi-Standard/ + ref: ${{ env.EDFI_STANDARD_REFERENCE }} + - name: Is pull request branch exists in Ed-Fi-Standard + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-Standard" + - name: Is pull request branch exists in Ed-Fi-ODS-Implementation + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS-Implementation" + - name: Install Postgres13 + shell: pwsh + run: | + 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: Initialize-DevelopmentEnvironment + working-directory: ./Ed-Fi-ODS-Implementation/ + run: | + $ErrorActionPreference = 'Stop' + [Environment]::SetEnvironmentVariable('msbuild_buildConfiguration', '${{ env.CONFIGURATION }}') + $PSVersionTable + . $env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1 + Initialize-DevelopmentEnvironment -NoCredentials -NoDeploy -Engine PostgreSQL + shell: powershell + - name: Remove Plug-Ins + working-directory: ./Ed-Fi-ODS-Implementation/ + run: | + $ErrorActionPreference = 'Stop' + rm -R "./Plugin/EdFi.*" + shell: powershell + - name: Create Database Template (no extensions) + working-directory: ./ + run: | + $ErrorActionPreference = 'Stop' + [Environment]::SetEnvironmentVariable('msbuild_buildConfiguration', '${{ env.CONFIGURATION }}') + Import-Module -Force -Scope Global "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Modules/create-populated-template.psm1" + Initialize-PopulatedTemplate -samplePath "./Ed-Fi-Standard/" -noExtensions -Engine PostgreSQL + shell: powershell + - name: pack + working-directory: ./Ed-Fi-ODS/ + run: | + .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Database/EdFi.Ods.Populated.Template.PostgreSQL.nuspec" -PackageName "EdFi.Suite3.Ods.Populated.Template.PostgreSQL" + shell: powershell + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: powershell + - 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.Ods.Populated.Template.PostgreSQL" + shell: powershell + - name: Upload EdFi.Ods.Populated.Template Artifacts + if: success() || failure() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: NugetPackages.Artifacts + path: ${{ github.workspace }}/Ed-Fi-ODS/NugetPackages/EdFi.Suite3.Ods.Populated.Template.PostgreSQL*.nupkg diff --git a/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml b/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml new file mode 100644 index 0000000000..555c577b5d --- /dev/null +++ b/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.PostgreSQL.yml @@ -0,0 +1,121 @@ +# 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.Ods.Populated.Template.TPDM.PostgreSQL + +on: + push: + branches: [main-5x, 'b-v*-patch*','feature-*'] + workflow_dispatch: + repository_dispatch: + types: [triggered-from-implementation-repo ,triggered-from-datastandard-repo ,triggered-from-tpdmartifacts-repo] + +env: + EDFI_STANDARD_REFERENCE: "v4.0.0" + TPDM_ARTIFACT_REFERENCE: "Data-Standard-v4.0.0" + INFORMATIONAL_VERSION: "5.4" + 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" + REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} + HEAD_REF: ${{ GITHUB.HEAD_REF }} + REF_NAME: ${{ GITHUB.REF_NAME }} + +jobs: + build: + + runs-on: windows-latest + + steps: + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - 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: 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: Checkout Ed-Fi-ODS-Standard + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-Standard + path: Ed-Fi-Standard/ + ref: ${{ env.EDFI_STANDARD_REFERENCE }} + - name: Is pull request branch exists in Ed-Fi-Standard + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-Standard" + - name: Checkout Ed-Fi-TPDM-Artifacts + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-TPDM-Artifacts + path: Ed-Fi-TPDM-Artifacts/ + ref: ${{ env.TPDM_ARTIFACT_REFERENCE }} + - name: Is pull request branch exists in Ed-Fi-TPDM-Artifacts + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-TPDM-Artifacts" + - name: Is pull request branch exists in Ed-Fi-ODS-Implementation + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS-Implementation" + - name: Install Postgres13 + shell: pwsh + run: | + 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: Initialize-DevelopmentEnvironment + working-directory: ./Ed-Fi-ODS-Implementation/ + run: | + $ErrorActionPreference = 'Stop' + [Environment]::SetEnvironmentVariable('msbuild_buildConfiguration', '${{ env.CONFIGURATION }}') + $PSVersionTable + . $env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1 + Initialize-DevelopmentEnvironment -UsePlugins -NoDeploy -Engine PostgreSQL + shell: powershell + - name: Create Database Template (no extensions) + run: | + $ErrorActionPreference = 'Stop' + [Environment]::SetEnvironmentVariable('msbuild_buildConfiguration', '${{ env.CONFIGURATION }}') + Import-Module -Force -Scope Global "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Modules/create-tpdm-template.psm1" + Initialize-TPDMTemplate -Engine PostgreSQL + shell: powershell + - name: pack + working-directory: ./Ed-Fi-ODS/ + run: | + .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Database/EdFi.Ods.Populated.Template.TPDM.Core.PostgreSQL.nuspec" -PackageName "EdFi.Suite3.Ods.Populated.Template.TPDM.Core.PostgreSQL" + shell: powershell + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: powershell + - 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.Ods.Populated.Template.TPDM.Core.PostgreSQL" + shell: powershell + - name: Upload EdFi.Ods.Populated.Template.TPDM.PostgreSQL Artifacts + if: success() || failure() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: NugetPackages.Artifacts + path: | + ${{ github.workspace }}/Ed-Fi-ODS/NugetPackages/EdFi.Suite3.Ods.Populated.Template.TPDM.Core.PostgreSQL*.nupkg + ${{ github.workspace }}/Ed-Fi-ODS/Utilities/DataLoading/EdFi.BulkLoadClient.Console/bin/**/logfile*.* + ${{ github.workspace }}/Ed-Fi-ODS-Implementation/Application/EdFi.Ods.Api.IntegrationTestHarness/bin/**/TestHarnessLog*.* diff --git a/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.yml b/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.yml new file mode 100644 index 0000000000..bf064f08d3 --- /dev/null +++ b/.github/workflows/Pkg EdFi.Ods.Populated.Template.TPDM.yml @@ -0,0 +1,117 @@ +# 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.Ods.Populated.Template.TPDM + +on: + push: + branches: [main-5x, 'b-v*-patch*','feature-*'] + workflow_dispatch: + repository_dispatch: + types: [triggered-from-implementation-repo ,triggered-from-datastandard-repo ,triggered-from-tpdmartifacts-repo] + +env: + EDFI_STANDARD_REFERENCE: "v4.0.0" + TPDM_ARTIFACT_REFERENCE: "Data-Standard-v4.0.0" + INFORMATIONAL_VERSION: "5.4" + 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" + REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} + HEAD_REF: ${{ GITHUB.HEAD_REF }} + REF_NAME: ${{ GITHUB.REF_NAME }} +jobs: + build: + + runs-on: windows-latest + + steps: + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - 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: 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: Checkout Ed-Fi-ODS-Standard + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-Standard + path: Ed-Fi-Standard/ + ref: ${{ env.EDFI_STANDARD_REFERENCE }} + - name: Is pull request branch exists in Ed-Fi-Standard + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-Standard" + - name: Checkout Ed-Fi-TPDM-Artifacts + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-TPDM-Artifacts + path: Ed-Fi-TPDM-Artifacts/ + ref: ${{ env.TPDM_ARTIFACT_REFERENCE }} + - name: Is pull request branch exists in Ed-Fi-TPDM-Artifacts + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-TPDM-Artifacts" + - name: Is pull request branch exists in Ed-Fi-ODS-Implementation + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS-Implementation" + - name: Install sql-server-2019 & sqlpackage + shell: powershell + 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 + - name: Initialize-DevelopmentEnvironment + working-directory: ./Ed-Fi-ODS-Implementation/ + run: | + $ErrorActionPreference = 'Stop' + $PSVersionTable + . $env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1 + Initialize-DevelopmentEnvironment -UsePlugins -NoDeploy + shell: powershell + - name: Create Database Template (no extensions) + working-directory: ./ + run: | + $ErrorActionPreference = 'Stop' + Import-Module -Force -Scope Global "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Modules/create-tpdm-template.psm1" + Initialize-TPDMTemplate + shell: powershell + - name: pack + working-directory: ./Ed-Fi-ODS/ + run: | + .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Database/EdFi.Ods.Populated.Template.TPDM.Core.nuspec" -PackageName "EdFi.Suite3.Ods.Populated.Template.TPDM.Core" + shell: powershell + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: powershell + - 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.Ods.Populated.Template.TPDM.Core" + shell: powershell + - name: Upload EdFi.Ods.Populated.Template.TPDM.Core Artifacts + if: success() || failure() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: EdFi.Ods.Populated.Template.TPDM.Core.Artifacts + path: | + ${{ github.workspace }}/Ed-Fi-ODS/NugetPackages/EdFi.Suite3.Ods.Populated.Template.TPDM.Core*.nupkg + ${{ github.workspace }}/Ed-Fi-ODS/Utilities/DataLoading/EdFi.BulkLoadClient.Console/bin/**/logfile*.* + ${{ github.workspace }}/Ed-Fi-ODS-Implementation/Application/EdFi.Ods.Api.IntegrationTestHarness/bin/**/TestHarnessLog*.* diff --git a/.github/workflows/Pkg EdFi.Ods.Populated.Template.yml b/.github/workflows/Pkg EdFi.Ods.Populated.Template.yml new file mode 100644 index 0000000000..15371ca207 --- /dev/null +++ b/.github/workflows/Pkg EdFi.Ods.Populated.Template.yml @@ -0,0 +1,112 @@ +# 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.Ods.Populated.Template + +on: + push: + branches: [main-5x, 'b-v*-patch*','feature-*'] + workflow_dispatch: + repository_dispatch: + types: [triggered-from-implementation-repo ,triggered-from-datastandard-repo] + +env: + EDFI_STANDARD_REFERENCE: "v4.0.0" + INFORMATIONAL_VERSION: "5.4" + 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" + REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} + HEAD_REF: ${{ GITHUB.HEAD_REF }} + REF_NAME: ${{ GITHUB.REF_NAME }} +jobs: + build: + + runs-on: windows-latest + + steps: + - name: Setup .NET + uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 + with: + dotnet-version: 3.1.x + - 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: 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: Checkout Ed-Fi-ODS-Standard + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-Standard + path: Ed-Fi-Standard/ + ref: ${{ env.EDFI_STANDARD_REFERENCE }} + - name: Is pull request branch exists in Ed-Fi-Standard + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-Standard" + - name: Is pull request branch exists in Ed-Fi-ODS-Implementation + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS-Implementation" + - name: Install sql-server-2019 & sqlpackage + shell: powershell + 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 + - name: Initialize-DevelopmentEnvironment + working-directory: ./Ed-Fi-ODS-Implementation/ + run: | + $ErrorActionPreference = 'Stop' + [Environment]::SetEnvironmentVariable('msbuild_buildConfiguration', '${{ env.CONFIGURATION }}') + + $PSVersionTable + . $env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1 + + Initialize-DevelopmentEnvironment -NoCredentials -NoDeploy + shell: powershell + - name: Remove Plug-Ins + working-directory: ./Ed-Fi-ODS-Implementation/ + run: | + $ErrorActionPreference = 'Stop' + rm -R "./Plugin/EdFi.*" + shell: powershell + - name: Create Database Template (no extensions) + working-directory: ./ + run: | + $ErrorActionPreference = 'Stop' + [Environment]::SetEnvironmentVariable('msbuild_buildConfiguration', '${{ env.CONFIGURATION }}') + Import-Module -Force -Scope Global "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Modules/create-populated-template.psm1" + Initialize-PopulatedTemplate -samplePath './Ed-Fi-Standard/' -noExtensions + shell: powershell + - name: pack + working-directory: ./Ed-Fi-ODS/ + run: | + .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/DatabaseTemplate/Database/EdFi.Ods.Populated.Template.nuspec" -PackageName "EdFi.Suite3.Ods.Populated.Template" + shell: powershell + - name: Install-credential-handler + run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" + shell: powershell + - 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.Ods.Populated.Template" + shell: powershell + - name: Upload EdFi.Ods.Populated.Template Artifacts + if: success() || failure() + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + with: + name: NugetPackages.Artifacts + path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/*.* diff --git a/build.githubactions.ps1 b/build.githubactions.ps1 new file mode 100644 index 0000000000..d1e169d460 --- /dev/null +++ b/build.githubactions.ps1 @@ -0,0 +1,246 @@ +# 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. + +[CmdLetBinding()] +param( + # Command to execute, defaults to "Build". + [string] + [ValidateSet("DotnetClean", "Build", "Test", "Pack", "Publish", "CheckoutBranch")] + $Command = "Build", + + [switch] $SelfContained, + + # Informational version number, defaults 1.0 + [string] + $InformationalVersion = "1.0", + + # Build counter from the automation tool. + [string] + $BuildCounter = "1", + + [string] + $BuildIncrementer = "0", + + # .NET project build configuration, defaults to "Release". Options are: Debug, Release. + [string] + [ValidateSet("Debug", "Release")] + $Configuration = "Release", + + [bool] + $DryRun = $false, + + [string] + $NugetApiKey, + + [string] + $EdFiNuGetFeed, + + # .Net Project Solution Name + [string] + $Solution, + + # .Net Project Name + [string] + $ProjectFile, + + [string] + $PackageName, + + [string] + $TestFilter, + + [string] + $NuspecFilePath, + + [string] + $RelativeRepoPath +) + +$newRevision = ([int]$BuildCounter) + ([int]$BuildIncrementer) +$version = "$InformationalVersion.$newRevision" +$packageOutput = "$PSScriptRoot/NugetPackages" +$packagePath = "$packageOutput/$PackageName.$version.nupkg" + +if ([string]::IsNullOrWhiteSpace($Solution)){ + $Solution =$ProjectFile +} + +function Invoke-Execute { + param ( + [ScriptBlock] + $Command + ) + + $global:lastexitcode = 0 + & $Command + + if ($lastexitcode -ne 0) { + throw "Error executing command: $Command" + } +} + +function Invoke-Step { + param ( + [ScriptBlock] + $block + ) + + $command = $block.ToString().Trim() + + Write-Host + Write-Host $command -fore CYAN + + &$block +} + +function Invoke-Main { + param ( + [ScriptBlock] + $MainBlock + ) + + try { + &$MainBlock + Write-Host + Write-Host "Build Succeeded" -fore GREEN + exit 0 + } catch [Exception] { + Write-Host + Write-Error $_.Exception.Message + Write-Host + Write-Error "Build Failed" + exit 1 + } +} + +function DotnetClean { + Invoke-Execute { dotnet clean $Solution -c $Configuration --nologo -v minimal } +} + +function Compile { + Invoke-Execute { + dotnet --info + dotnet build $Solution -c $Configuration --version-suffix $version + } +} + +function Pack { + if ([string]::IsNullOrWhiteSpace($PackageName) -and [string]::IsNullOrWhiteSpace($NuspecFilePath)){ + Invoke-Execute { + dotnet pack $ProjectFile -c $Configuration --output $packageOutput --no-build --verbosity normal -p:VersionPrefix=$version -p:NoWarn=NU5123 + } + } + if ($NuspecFilePath -Like "*.nuspec" -and $PackageName -ne $null){ + nuget pack $NuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties configuration=$Configuration -Properties id=$PackageName -NoPackageAnalysis -NoDefaultExcludes + } + if ([string]::IsNullOrWhiteSpace($NuspecFilePath) -and $PackageName -ne $null){ + Invoke-Execute { + dotnet pack $ProjectFile -c $Configuration --output $packageOutput --no-build --verbosity normal -p:VersionPrefix=$version -p:NoWarn=NU5123 -p:PackageId=$PackageName + } + } +} + +function Publish { + Invoke-Execute { + + if (-not $NuGetApiKey) { + throw "Cannot push a NuGet package without providing an API key in the `NuGetApiKey` argument." + } + + if (-not $EdFiNuGetFeed) { + throw "Cannot push a NuGet package without providing a feed in the `EdFiNuGetFeed` argument." + } + + if($DryRun){ + Write-Host "Dry run enabled, not pushing package." + } else { + Write-Host "Pushing $packagePath to $EdFiNuGetFeed" + + dotnet nuget push $packagePath --api-key $NuGetApiKey --source $EdFiNuGetFeed + } + } +} + +function Test { + if(-not $TestFilter) { + Invoke-Execute { dotnet test $solution -c $Configuration --no-build -v normal --filter 'FullyQualifiedName!~DataAccess.IntegrationTests'} + } else { + Invoke-Execute { dotnet test $solution -c $Configuration --no-build -v normal --filter TestCategory!~"$TestFilter" } + } +} + +function CheckoutBranch { + Set-Location $RelativeRepoPath + $odsBranch = $Env:REPOSITORY_DISPATCH_BRANCH + Write-Output "OdsBranch: $odsBranch" + if($odsBranch -ne ''){ + $patternName = "refs/heads/$odsBranch" + $does_corresponding_branch_exist = $false + $does_corresponding_branch_exist = git ls-remote --heads origin $odsBranch | Select-String -Pattern $patternName -SimpleMatch -Quiet + if ($does_corresponding_branch_exist -eq $true) { + Write-Output "Corresponding branch for $odsBranch exists in $RelativeRepoPath repo, so checking it out" + git fetch origin $odsBranch + git checkout $odsBranch + } else { + Write-Output "Corresponding branch for $odsBranch does not exist in Implementation repo, so not changing branch checked out" + } + } else { + Write-Output "ref_name: $Env:REF_NAME" + $current_branch = "$Env:REF_NAME" + if ($current_branch -like "*/merge"){ + Write-Output "ref_name is PR, so using head_ref: $Env:HEAD_REF" + $current_branch = "$Env:HEAD_REF" + } + $patternName = "refs/heads/$current_branch" + Write-Output "Pattern Name is $patternName" -fore GREEN + $branch_exists = $false + $branch_exists = git ls-remote --heads origin $current_branch | Select-String -Pattern $patternName -SimpleMatch -Quiet + if ($branch_exists -eq $true) { + Write-Output "Current branch exists, so setting to $current_branch" + git fetch origin $current_branch + git checkout $current_branch + } else { + Write-Output "did not match on any results for changing ODS checkout branch" + } + } +} + +function Invoke-Build { + Write-Host "Building Version $version" -ForegroundColor Cyan + Invoke-Step { DotnetClean } + Invoke-Step { Compile } +} + +function Invoke-DotnetClean { + Invoke-Step { DotnetClean } +} + +function Invoke-Publish { + Invoke-Step { Publish } +} + +function Invoke-Tests { + Invoke-Step { Test } +} + +function Invoke-Pack { + Invoke-Step { Pack } +} + +function Invoke-CheckoutBranch { + Invoke-Step { CheckoutBranch } +} + +Invoke-Main { + switch ($Command) { + DotnetClean { Invoke-DotnetClean } + Build { Invoke-Build } + Test { Invoke-Tests } + Pack { Invoke-Pack } + Publish { Invoke-Publish } + CheckoutBranch { Invoke-CheckoutBranch } + default { throw "Command '$Command' is not recognized" } + } +} \ No newline at end of file