Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 114 additions & 3 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,117 @@ jobs:
./mvnw -B clean package exec:java -Dexec.args="$GITHUB_WORKSPACE"


firebird-install:
name: Test Firebird install script
needs: [build, should-do-database-tests, check_branch]
runs-on: ubuntu-latest
if: ${{ needs.should-do-database-tests.outputs.check == 'true' || needs.check_branch.outputs.is_publishable_branch == 'true'}}
steps:
- name: Checkout Openfire
uses: actions/checkout@v6
- name: Set up JDK 17 Zulu
uses: actions/setup-java@v5
with:
java-version: 17
distribution: zulu
cache: maven
- name: Restore mvn repo artifacts from build job
uses: actions/download-artifact@v8
with:
name: Maven Repository
path: ~/.m2/repository/org/igniterealtime/openfire/
- name: Set environment variables
run: |
echo "CONNECTION_STRING=jdbc:firebirdsql://localhost:3050//var/lib/firebird/data/openfire.fdb" >> $GITHUB_ENV
Copy link
Copy Markdown

@mrotteveel mrotteveel Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For ease of use, if you add FIREBIRD_CONF_DatabaseAccess: Restrict /var/lib/firebird/data in your docker compose file, you can also use only the filename instead of the full path, i.e. jdbc:firebirdsql://localhost:3050/openfire.fdb

(NB: prefix jdbc:firebird: is also supported, and port (:3050) is already the default)

echo "CONNECTION_DRIVER=org.firebirdsql.jdbc.FBDriver" >> $GITHUB_ENV
echo "CONNECTION_USERNAME=sysdba" >> $GITHUB_ENV
echo "CONNECTION_PASSWORD=SecurePa55w0rd" >> $GITHUB_ENV
OPENFIREVSN=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "OPENFIREVSN=$OPENFIREVSN" >> $GITHUB_ENV
echo "JAVA_HOME=$(echo $JAVA_HOME_17_X64)" >> $GITHUB_ENV
- name: Start database server with an empty database
run: |
mkdir olddb
docker compose -f ./build/ci/compose/firebird.yml up --wait
- name: Execute Openfire's database install script
run: |
pushd ./build/ci/updater
./mvnw -B clean package exec:java -Dexec.args="$GITHUB_WORKSPACE"

# Firebird support was added recently and upgrade scripts are not available yet by virtue of support being new.
# Skip Firebird upgrade execution until the target upgrade directory exists. This step can be removed completely
# after things have matured.
firebird-upgrade-precheck:
name: Check Firebird upgrade prerequisites
needs: [should-do-database-tests, check_branch]
runs-on: ubuntu-latest
if: ${{ needs.should-do-database-tests.outputs.check == 'true' || needs.check_branch.outputs.is_publishable_branch == 'true'}}
outputs:
upgrade-dir-exists: ${{ steps.check-firebird-upgrade-dir.outputs.exists }}
steps:
- name: Checkout Openfire
uses: actions/checkout@v6
- name: Check if Firebird upgrade directory exists
id: check-firebird-upgrade-dir
run: |
if [ -d distribution/src/database/upgrade/39 ]; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
echo "Skipping firebird-upgrade: Firebird support is new and upgrade scripts are not available yet."
Comment thread
guusdk marked this conversation as resolved.
fi


firebird-upgrade:
name: Test Firebird upgrade scripts
needs: [build, should-do-database-tests, check_branch, firebird-upgrade-precheck]
runs-on: ubuntu-latest
if: ${{ needs.should-do-database-tests.outputs.check == 'true' || needs.check_branch.outputs.is_publishable_branch == 'true' }}
steps:
- name: Skip Firebird upgrade test when scripts are not available yet
if: ${{ needs.firebird-upgrade-precheck.outputs.upgrade-dir-exists != 'true' }}
run: 'echo "Skipping firebird-upgrade: Firebird support is new and upgrade scripts are not available yet."'
- name: Checkout Openfire
if: ${{ needs.firebird-upgrade-precheck.outputs.upgrade-dir-exists == 'true' }}
uses: actions/checkout@v6
- name: Set up JDK 17 Zulu
if: ${{ needs.firebird-upgrade-precheck.outputs.upgrade-dir-exists == 'true' }}
uses: actions/setup-java@v5
with:
java-version: 17
distribution: zulu
cache: maven
- name: Restore mvn repo artifacts from build job
if: ${{ needs.firebird-upgrade-precheck.outputs.upgrade-dir-exists == 'true' }}
uses: actions/download-artifact@v8
with:
name: Maven Repository
path: ~/.m2/repository/org/igniterealtime/openfire/
- name: Set environment variables
if: ${{ needs.firebird-upgrade-precheck.outputs.upgrade-dir-exists == 'true' }}
run: |
echo "CONNECTION_STRING=jdbc:firebirdsql://localhost:3050//var/lib/firebird/data/openfire.fdb" >> $GITHUB_ENV
echo "CONNECTION_DRIVER=org.firebirdsql.jdbc.FBDriver" >> $GITHUB_ENV
echo "CONNECTION_USERNAME=sysdba" >> $GITHUB_ENV
echo "CONNECTION_PASSWORD=SecurePa55w0rd" >> $GITHUB_ENV
OPENFIREVSN=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "OPENFIREVSN=$OPENFIREVSN" >> $GITHUB_ENV
echo "JAVA_HOME=$(echo $JAVA_HOME_17_X64)" >> $GITHUB_ENV
- name: Download an old Openfire database installation script
if: ${{ needs.firebird-upgrade-precheck.outputs.upgrade-dir-exists == 'true' }}
run: |
mkdir olddb
curl https://raw.githubusercontent.com/igniterealtime/Openfire/v5.1.0/distribution/src/database/openfire_firebird.sql > $GITHUB_WORKSPACE/olddb/openfire_firebird.sql
- name: Start database server, install old version of the Openfire database
if: ${{ needs.firebird-upgrade-precheck.outputs.upgrade-dir-exists == 'true' }}
run: docker compose -f ./build/ci/compose/firebird.yml up --wait
- name: Execute Openfire's database upgrade scripts
if: ${{ needs.firebird-upgrade-precheck.outputs.upgrade-dir-exists == 'true' }}
run: |
pushd ./build/ci/updater
./mvnw -B clean package exec:java -Dexec.args="$GITHUB_WORKSPACE"


mysql-install:
name: Test MySQL install script
needs: [build, should-do-database-tests, check_branch]
Expand Down Expand Up @@ -768,7 +879,7 @@ jobs:
publish-maven:
name: Publish to Maven
runs-on: ubuntu-latest
needs: [aioxmpp, connectivity, integration, xitf, check_branch, hsqldb-install, hsqldb-upgrade, sqlserver-install, sqlserver-upgrade, postgres-install, postgres-upgrade, mysql-install, mysql-upgrade, oracle-install, oracle-upgrade]
needs: [aioxmpp, connectivity, integration, xitf, check_branch, hsqldb-install, hsqldb-upgrade, sqlserver-install, sqlserver-upgrade, postgres-install, postgres-upgrade, firebird-install, firebird-upgrade, mysql-install, mysql-upgrade, oracle-install, oracle-upgrade]
if: ${{github.repository == 'igniterealtime/Openfire' && github.event_name == 'push' && needs.check_branch.outputs.is_publishable_branch == 'true'}}

steps:
Expand All @@ -795,7 +906,7 @@ jobs:
publish-docker:
name: Publish to GitHub's Docker registry
runs-on: ubuntu-latest
needs: [build-docker, aioxmpp, connectivity, integration, xitf, check_branch, hsqldb-install, hsqldb-upgrade, sqlserver-install, sqlserver-upgrade, postgres-install, postgres-upgrade, mysql-install, mysql-upgrade, oracle-install, oracle-upgrade]
needs: [build-docker, aioxmpp, connectivity, integration, xitf, check_branch, hsqldb-install, hsqldb-upgrade, sqlserver-install, sqlserver-upgrade, postgres-install, postgres-upgrade, firebird-install, firebird-upgrade, mysql-install, mysql-upgrade, oracle-install, oracle-upgrade]
if: |
github.event_name == 'push' &&
(contains(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main')
Expand Down Expand Up @@ -854,7 +965,7 @@ jobs:
build-deb-artifact:
name: Generate DEB artifact
runs-on: ubuntu-latest
needs: [aioxmpp, connectivity, integration, xitf, check_branch, hsqldb-install, hsqldb-upgrade, sqlserver-install, sqlserver-upgrade, postgres-install, postgres-upgrade, mysql-install, mysql-upgrade, oracle-install, oracle-upgrade]
needs: [aioxmpp, connectivity, integration, xitf, check_branch, hsqldb-install, hsqldb-upgrade, sqlserver-install, sqlserver-upgrade, postgres-install, postgres-upgrade, firebird-install, firebird-upgrade, mysql-install, mysql-upgrade, oracle-install, oracle-upgrade]
steps:
- uses: actions/checkout@v6
with:
Expand Down
16 changes: 16 additions & 0 deletions build/ci/compose/firebird.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
services:
db:
image: firebirdsql/firebird:5.0.3
ports:
- "3050:3050"
environment:
- FIREBIRD_DATABASE=openfire.fdb
- FIREBIRD_ROOT_PASSWORD=${CONNECTION_PASSWORD}
healthcheck:
test: [ "CMD-SHELL", "echo 'select 1 from rdb$$database;' | /opt/firebird/bin/isql -user SYSDBA -password $$FIREBIRD_ROOT_PASSWORD localhost/3050:/var/lib/firebird/data/$$FIREBIRD_DATABASE >/dev/null 2>&1" ]
interval: 5s
timeout: 10s
retries: 30
volumes:
- ${GITHUB_WORKSPACE}/olddb:/var/lib/firebird/data

5 changes: 5 additions & 0 deletions build/ci/updater/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
<artifactId>postgresql</artifactId>
<version>42.7.8</version>
</dependency>
<dependency>
<groupId>org.firebirdsql.jdbc</groupId>
<artifactId>jaybird</artifactId>
<version>6.0.5</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2025 Ignite Realtime Foundation. All rights reserved.
* Copyright (C) 2021-2026 Ignite Realtime Foundation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -49,6 +49,7 @@ public static void main(String[] args) throws Exception
"Oracle","oracle.jdbc.driver.OracleDriver","jdbc:oracle:thin:@HOSTNAME:1521:SID"
"Microsoft SQL Server (legacy)","net.sourceforge.jtds.jdbc.Driver","jdbc:jtds:sqlserver://HOSTNAME/DATABASENAME;appName=Openfire"
"PostgreSQL","org.postgresql.Driver","jdbc:postgresql://HOSTNAME:5432/DATABASENAME"
"Firebird","org.firebirdsql.jdbc.FBDriver","jdbc:firebirdsql://HOSTNAME:3050//ABSOLUTE_PATH_TO_DATABASE_FILE"
"IBM DB2","com.ibm.db2.jcc.DB2Driver","jdbc:db2://HOSTNAME:50000/DATABASENAME"
"Microsoft SQL Server","com.microsoft.sqlserver.jdbc.SQLServerDriver","jdbc:sqlserver://HOSTNAME:1433;databaseName=DATABASENAME;applicationName=Openfire"
*/
Expand Down
Loading
Loading