Skip to content

Commit

Permalink
[ODS-6299] Update to PostgreSQL 16 (#1028)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Jackson <[email protected]>
  • Loading branch information
stephenfuqua and mjaksn authored Aug 2, 2024
1 parent 73a9791 commit 9cfe751
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/Pkg EdFi.Database.Admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ jobs:
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:${{ env.POSTGRES_PASSWORD }}'
$confPath = "C:\Program Files\PostgreSQL\13\data\pg_hba.conf"
choco install postgresql16 --params '/Password:${{ env.POSTGRES_PASSWORD }}'
$confPath = "C:\Program Files\PostgreSQL\16\data\pg_hba.conf"
(Get-Content $confPath).Replace("scram-sha-256","trust") | Set-Content $confPath
Restart-Service postgresql-x64-13
Restart-Service postgresql-x64-16
- name: Create Admin Database
shell: powershell
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/Pkg EdFi.Database.Security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ jobs:
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:${{ env.POSTGRES_PASSWORD }}'
$confPath = "C:\Program Files\PostgreSQL\13\data\pg_hba.conf"
choco install postgresql16 --params '/Password:${{ env.POSTGRES_PASSWORD }}'
$confPath = "C:\Program Files\PostgreSQL\16\data\pg_hba.conf"
(Get-Content $confPath).Replace("scram-sha-256","trust") | Set-Content $confPath
Restart-Service postgresql-x64-13
Restart-Service postgresql-x64-16
- name: Create Security Database
shell: powershell
run: |
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/Pkg EdFi.Ods.Minimal.Template.PostgreSQL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
name: build (Standard Version ${{ matrix.StandardVersion }})
services:
postgres:
image: postgres:13
image: postgres:16.3-alpine3.19@sha256:eb98285d1b37703deb53543d0d5f1b19124616bae59a6d42d1c98531f7c2677a
env:
POSTGRES_HOST_AUTH_METHOD: trust
# Set health checks to wait until postgres has started
Expand Down Expand Up @@ -96,6 +96,15 @@ jobs:
shell: pwsh
run: |
.\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS-Implementation"
- name: Install postgresql-client-16 package
run: |
sudo apt-get update
sudo apt-get -y install curl ca-certificates
sudo install -d /usr/share/postgresql-common/pgdg
sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update
sudo apt-get -y install postgresql-client-16
- name: Cache Nuget packages
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 #v4.0.1
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
name: build (Standard ${{ matrix.StandardVersion }} Extension ${{ matrix.ExtensionVersion }})
services:
postgres:
image: postgres:13
image: postgres:16.3-alpine3.19@sha256:eb98285d1b37703deb53543d0d5f1b19124616bae59a6d42d1c98531f7c2677a
env:
POSTGRES_HOST_AUTH_METHOD: trust
# Set health checks to wait until postgres has started
Expand Down Expand Up @@ -116,6 +116,15 @@ jobs:
echo "BUILD_INCREMENTER=$newRevision">> $env:GITHUB_ENV
}
shell: pwsh
- name: Install postgresql-client-16 package
run: |
sudo apt-get update
sudo apt-get -y install curl ca-certificates
sudo install -d /usr/share/postgresql-common/pgdg
sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update
sudo apt-get -y install postgresql-client-16
- name: Cache Nuget packages
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 #v4.0.1
with:
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/Pkg EdFi.Ods.Populated.Template.PostgreSQL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
name: build (Standard Version ${{ matrix.StandardVersion }})
services:
postgres:
image: postgres:13
image: postgres:16.3-alpine3.19@sha256:eb98285d1b37703deb53543d0d5f1b19124616bae59a6d42d1c98531f7c2677a
env:
POSTGRES_HOST_AUTH_METHOD: trust
# Set health checks to wait until postgres has started
Expand Down Expand Up @@ -95,6 +95,15 @@ jobs:
shell: pwsh
run: |
.\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS-Implementation"
- name: Install postgresql-client-16 package
run: |
sudo apt-get update
sudo apt-get -y install curl ca-certificates
sudo install -d /usr/share/postgresql-common/pgdg
sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update
sudo apt-get -y install postgresql-client-16
- name: Cache Nuget packages
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 #v4.0.1
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
name: build (Standard ${{ matrix.StandardVersion }} Extension ${{ matrix.ExtensionVersion }})
services:
postgres:
image: postgres:13
image: postgres:16.3-alpine3.19@sha256:eb98285d1b37703deb53543d0d5f1b19124616bae59a6d42d1c98531f7c2677a
env:
POSTGRES_HOST_AUTH_METHOD: trust
# Set health checks to wait until postgres has started
Expand Down Expand Up @@ -116,6 +116,15 @@ jobs:
echo "BUILD_INCREMENTER=$newRevision">> $env:GITHUB_ENV
}
shell: pwsh
- name: Install postgresql-client-16 package
run: |
sudo apt-get update
sudo apt-get -y install curl ca-certificates
sudo install -d /usr/share/postgresql-common/pgdg
sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update
sudo apt-get -y install postgresql-client-16
- name: Cache Nuget packages
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 #v4.0.1
with:
Expand Down

0 comments on commit 9cfe751

Please sign in to comment.