Skip to content

[ODS-6570] Nhibernate Upgrade for 7.1 and 7.2 #2406

[ODS-6570] Nhibernate Upgrade for 7.1 and 7.2

[ODS-6570] Nhibernate Upgrade for 7.1 and 7.2 #2406

name: Trgr InitDev workflows in Implementation repo
on:
pull_request:
branches: [main, 'ODS-*',b-v*-patch*]
workflow_dispatch:
env:
EDFI_ODS_IMP_TOKEN: ${{ secrets.REPO_DISPATCH_TOKEN }}
REPOSITORY_OWNER: ${{ GITHUB.REPOSITORY_OWNER }}
HEAD_REF: ${{ GITHUB.HEAD_REF }}
REF_NAME: ${{ GITHUB.REF_NAME }}
REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check for Repo Dispatch Token
if: ${{ env.REPOSITORY_OWNER == 'Ed-Fi-Alliance-OSS' && env.EDFI_ODS_IMP_TOKEN == '' }}
run: |
echo "::error::Missing GitHub Token"
exit 1
- name: Setup .NET
uses: actions/setup-dotnet@c0d4ad69d8bd405d234f1c9166d383b7a4f69ed8 # 2.1.0
with:
dotnet-version: 6.0.x
- name: Checkout Ed-Fi-ODS
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
path: Ed-Fi-ODS/
token: ${{ secrets.REPO_DISPATCH_TOKEN }}
- 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@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation
path: Ed-Fi-ODS-Implementation/
token: ${{ secrets.REPO_DISPATCH_TOKEN }}
- 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: Set Current Branch Environment Variable
shell: pwsh
run: |
$current_branch = '${{env.REF_NAME}}'
if ($current_branch -like "*/merge"){
$current_branch = '${{env.HEAD_REF}}'
}
Write-Host "Current Branch: $current_branch"
echo "current_branch=$current_branch" >> $Env:GITHUB_ENV
- name: Check Ed-Fi-ODS-Implementation Repo PR exists or not
shell: pwsh
run: |
$accessToken = "${{ env.EDFI_ODS_IMP_TOKEN }}"
$repositoryName = "Ed-Fi-ODS-Implementation"
$apiUrl = "https://api.github.com/repos/${{ env.REPOSITORY_OWNER }}/$repositoryName/pulls?state=open&head=${{ env.REPOSITORY_OWNER }}:${{ env.current_branch }}"
$headers = @{
Authorization = "Bearer $accessToken"
Accept = "application/vnd.github.v3+json"
}
$response = Invoke-WebRequest -Uri $apiUrl -Headers $headers
# Access x-ratelimit-limit and x-ratelimit-remaining from response headers
$rateLimitLimit = $response.Headers['X-RateLimit-Limit']
$rateLimitRemaining = $response.Headers['X-RateLimit-Remaining']
Write-Host "x-ratelimit-limit: $rateLimitLimit"
Write-Host "x-ratelimit-remaining: $rateLimitRemaining"
$jsonResponse = $response | ConvertFrom-Json
foreach ($pr in $jsonResponse) {
Write-Host "current branch: ${{ env.current_branch }}"
Write-Host "ref: $($pr.head.ref)"
if ($pr.head.ref -eq "${{ env.current_branch }}")
{
Write-Host "PR #$($pr.number): $($pr.head.label)"
echo "EXIT_STEP=true">> $env:GITHUB_ENV
}
}
- name: Check for EXIT_STEP Status
if: env.EXIT_STEP == 'true'
run: |
echo "::notice::Ed-Fi-ODS-Implementation already have same branch ${{ env.current_branch }} running all Initdev builds ,so Skipping this build"
echo "EXIT_STEP value is ${{ env.EXIT_STEP }}"
- name: Dispatch InitDev , Multitenancy workflow
if: env.EXIT_STEP != 'true'
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_InitDevMultitenancy
with:
token: ${{ env.EDFI_ODS_IMP_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS-Implementation
owner: ${{ github.repository_owner }}
workflow: InitDev, MultiTenancy.yml
workflow_timeout_seconds: 4800
- name: Dispatch InitDev, Smoke Tests workflow
if: env.EXIT_STEP != 'true'
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_InitDevSmokeTests
with:
token: ${{ env.EDFI_ODS_IMP_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS-Implementation
owner: ${{ github.repository_owner }}
workflow: InitDev, Smoke Tests.yml
workflow_timeout_seconds: 4800
- name: Dispatch InitDev, Unit tests, Integration tests, Package workflow
if: env.EXIT_STEP != 'true'
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_InitDevUnittestsIntegrationtestsPackage
with:
token: ${{ env.EDFI_ODS_IMP_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS-Implementation
owner: ${{ github.repository_owner }}
workflow: InitDev, Unit tests, Integration tests, Package.yml
workflow_timeout_seconds: 4800
- name: Dispatch InitDev Postgres, Multitenancy workflow
if: env.EXIT_STEP != 'true'
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_InitDevPostgresMultitenancy
with:
token: ${{ env.EDFI_ODS_IMP_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS-Implementation
owner: ${{ github.repository_owner }}
workflow: InitDev Postgres, MultiTenancy.yml
workflow_timeout_seconds: 4800
- name: Dispatch InitDev Postgres, Smoke Tests workflow
if: env.EXIT_STEP != 'true'
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_InitDevPostgresSmokeTests
with:
token: ${{ env.EDFI_ODS_IMP_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS-Implementation
owner: ${{ github.repository_owner }}
workflow: InitDev Postgres, Smoke Tests.yml
workflow_timeout_seconds: 4800
- name: Dispatch InitDev Postgres, Unit tests, Integration tests workflow
if: env.EXIT_STEP != 'true'
uses: Codex-/return-dispatch@9a2340d279253061c98206106038aab6ef0be02e #v1.14.0
id: return_dispatch_InitDevPostgresUnittestsIntegrationtests
with:
token: ${{ env.EDFI_ODS_IMP_TOKEN }}
ref: ${{ env.current_branch }}
repo: Ed-Fi-ODS-Implementation
owner: ${{ github.repository_owner }}
workflow: InitDev Postgres, Unit tests, Integration tests.yml
workflow_timeout_seconds: 4800
- name: Await to complete the execution for InitDev , MultiTenancy RunID ${{ steps.return_dispatch_InitDevMultitenancy.outputs.run_id }}
if: env.EXIT_STEP != 'true'
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_IMP_TOKEN }}
repo: Ed-Fi-ODS-Implementation
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_InitDevMultitenancy.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Await to complete the execution for InitDev, Smoke Tests RunID ${{ steps.return_dispatch_InitDevSmokeTests.outputs.run_id }}
if: env.EXIT_STEP != 'true'
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_IMP_TOKEN }}
repo: Ed-Fi-ODS-Implementation
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_InitDevSmokeTests.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Await to complete the execution for InitDev, Unit tests, Integration tests, Package RunID ${{ steps.return_dispatch_InitDevUnittestsIntegrationtestsPackage.outputs.run_id }}
if: env.EXIT_STEP != 'true'
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_IMP_TOKEN }}
repo: Ed-Fi-ODS-Implementation
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_InitDevUnittestsIntegrationtestsPackage.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Await to complete the execution for InitDev Postgres, MultiTenancy RunID ${{ steps.return_dispatch_InitDevPostgresMultitenancy.outputs.run_id }}
if: env.EXIT_STEP != 'true'
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_IMP_TOKEN }}
repo: Ed-Fi-ODS-Implementation
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_InitDevPostgresMultitenancy.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Await to complete the execution for InitDev Postgres, Smoke Tests RunID ${{ steps.return_dispatch_InitDevPostgresSmokeTests.outputs.run_id }}
if: env.EXIT_STEP != 'true'
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_IMP_TOKEN }}
repo: Ed-Fi-ODS-Implementation
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_InitDevPostgresSmokeTests.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000
- name: Await to complete the execution for InitDev Postgres, Unit tests, Integration tests RunID ${{ steps.return_dispatch_InitDevPostgresUnittestsIntegrationtests.outputs.run_id }}
if: env.EXIT_STEP != 'true'
uses: Codex-/await-remote-run@d4a6dbf57245924ff4f23e0db929b8e3ef65486b #v1.12.2
with:
token: ${{ env.EDFI_ODS_IMP_TOKEN }}
repo: Ed-Fi-ODS-Implementation
owner: ${{ github.repository_owner }}
run_id: ${{ steps.return_dispatch_InitDevPostgresUnittestsIntegrationtests.outputs.run_id }}
run_timeout_seconds: 4800
poll_interval_ms: 5000