2022-01-12 18:54:20 +01:00
|
|
|
name: Build and Test Oracle Connector
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- 1.*
|
2022-04-08 11:54:58 +02:00
|
|
|
- 2.*
|
2022-01-12 18:54:20 +01:00
|
|
|
paths:
|
|
|
|
- 'support/checkstyle/**'
|
|
|
|
- 'debezium-api/**'
|
|
|
|
- 'debezium-ddl-parser/**'
|
|
|
|
- 'debezium-assembly-descriptors/**'
|
|
|
|
- 'debezium-core/**'
|
|
|
|
- 'debezium-embedded/**'
|
|
|
|
- 'debezium-connector-oracle/**'
|
|
|
|
- 'debezium-parent/pom.xml'
|
|
|
|
- 'debezium-bom/pom.xml'
|
|
|
|
- 'pom.xml'
|
|
|
|
- '.github/workflows/oracle-workflow-test.yml'
|
2023-03-21 10:02:15 +01:00
|
|
|
pull_request:
|
2023-02-20 07:53:32 +01:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- 1.*
|
|
|
|
- 2.*
|
|
|
|
paths:
|
|
|
|
- 'support/checkstyle/**'
|
|
|
|
- 'debezium-api/**'
|
|
|
|
- 'debezium-ddl-parser/**'
|
|
|
|
- 'debezium-assembly-descriptors/**'
|
|
|
|
- 'debezium-core/**'
|
|
|
|
- 'debezium-embedded/**'
|
|
|
|
- 'debezium-connector-oracle/**'
|
|
|
|
- 'debezium-parent/pom.xml'
|
|
|
|
- 'debezium-bom/pom.xml'
|
|
|
|
- 'pom.xml'
|
|
|
|
- '.github/workflows/oracle-workflow-test.yml'
|
2022-01-12 18:54:20 +01:00
|
|
|
|
|
|
|
jobs:
|
2023-02-20 07:53:32 +01:00
|
|
|
check:
|
2023-10-05 13:10:58 +02:00
|
|
|
name: Check Pull-Secrets
|
2023-02-20 07:53:32 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
2023-04-12 15:18:13 +02:00
|
|
|
HAS_QUAY_IO: ${{ steps.skip.outputs.HAS_QUAY_IO }}
|
2023-02-20 07:53:32 +01:00
|
|
|
steps:
|
|
|
|
- name: Checkout Action
|
2023-09-04 22:10:59 +02:00
|
|
|
uses: actions/checkout@v4
|
2023-02-20 07:53:32 +01:00
|
|
|
|
|
|
|
- name: Check if author has Quay.io credentials
|
2023-03-13 06:45:12 +01:00
|
|
|
id: skip
|
2023-02-20 07:53:32 +01:00
|
|
|
env:
|
|
|
|
QUAY_IO_USERNAME: ${{ secrets.QUAY_IO_USERNAME }}
|
|
|
|
QUAY_IO_PASSWORD: ${{ secrets.QUAY_IO_PASSWORD }}
|
|
|
|
run: |
|
2023-03-21 10:02:15 +01:00
|
|
|
if [[ $QUAY_IO_USERNAME == '' ]] && [[ $QUAY_IO_PASSWORD == '' ]]; then
|
2023-04-12 15:18:13 +02:00
|
|
|
echo "HAS_QUAY_IO=false" >> $GITHUB_OUTPUT
|
2023-10-05 13:10:58 +02:00
|
|
|
exit -1
|
2023-04-12 15:18:13 +02:00
|
|
|
else
|
|
|
|
echo "HAS_QUAY_IO=true" >> $GITHUB_OUTPUT
|
2023-02-20 07:53:32 +01:00
|
|
|
fi
|
2023-04-12 15:18:13 +02:00
|
|
|
|
2023-10-05 13:10:58 +02:00
|
|
|
test-connector:
|
|
|
|
name: Oracle Connector
|
2022-01-12 18:54:20 +01:00
|
|
|
runs-on: ubuntu-latest
|
2023-03-21 10:02:15 +01:00
|
|
|
needs: [check]
|
2023-04-12 15:18:13 +02:00
|
|
|
if: ${{ needs.check.outputs.HAS_QUAY_IO == 'true' }}
|
2022-01-12 18:54:20 +01:00
|
|
|
steps:
|
|
|
|
- name: Checkout Action
|
2023-09-04 22:10:59 +02:00
|
|
|
uses: actions/checkout@v4
|
2022-01-21 15:55:03 +01:00
|
|
|
|
2022-01-12 18:54:20 +01:00
|
|
|
- name: Get Date
|
|
|
|
id: get-date
|
|
|
|
run: |
|
2023-01-11 09:09:02 +01:00
|
|
|
echo "date=$(/bin/date -u "+%Y-%m")" >> $GITHUB_OUTPUT
|
2022-01-12 18:54:20 +01:00
|
|
|
shell: bash
|
2022-01-21 15:55:03 +01:00
|
|
|
|
2022-01-12 18:54:20 +01:00
|
|
|
- name: Set up Java 17
|
2023-01-30 11:52:01 +01:00
|
|
|
uses: actions/setup-java@v3
|
2022-01-12 18:54:20 +01:00
|
|
|
with:
|
|
|
|
distribution: 'temurin'
|
|
|
|
java-version: 17
|
2022-01-21 15:55:03 +01:00
|
|
|
|
|
|
|
# This workflow uses its own dependency cache rather than the main debezium workflow cache because
|
2023-03-13 06:45:12 +01:00
|
|
|
# we explicitly want to trigger this build on pushes separate from the other workflow.
|
2022-01-12 18:54:20 +01:00
|
|
|
- name: Cache Maven Repository
|
2023-01-30 11:52:01 +01:00
|
|
|
uses: actions/cache@v3
|
2022-01-12 18:54:20 +01:00
|
|
|
with:
|
|
|
|
path: ~/.m2/repository
|
|
|
|
# refresh cache every month to avoid unlimited growth
|
2022-01-21 15:55:03 +01:00
|
|
|
# we do not explicitly base this on POM changes since we are explicitly targeting a single connector
|
|
|
|
# and the likelihood that lots of dependencies will change that impacts Oracle is significantly low
|
|
|
|
# compared to other parts of Debezium that rely on frameworks such as Quarkus.
|
2022-01-12 18:54:20 +01:00
|
|
|
key: maven-oracle-${{ steps.get-date.outputs.date }}
|
|
|
|
restore-keys: |
|
|
|
|
maven-oracle-${{ steps.get-date.outputs.date }}
|
2022-01-21 15:55:03 +01:00
|
|
|
|
|
|
|
- name: Build and Install Debezium dependencies
|
|
|
|
run: >
|
2022-06-06 01:43:31 +02:00
|
|
|
./mvnw clean install -pl debezium-bom,debezium-core,:debezium-ide-configs,:debezium-checkstyle,:debezium-revapi -am
|
2022-01-21 15:55:03 +01:00
|
|
|
-DskipTests=true
|
|
|
|
-DskipITs=true
|
|
|
|
-Dformat.formatter.goal=validate
|
|
|
|
-Dformat.imports.goal=check
|
|
|
|
-Dhttp.keepAlive=false
|
|
|
|
-Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
|
|
|
|
|
2022-01-12 18:54:20 +01:00
|
|
|
- name: Build and Test Debezium Connector Oracle LogMiner
|
|
|
|
env:
|
|
|
|
QUAY_IO_USERNAME: ${{ secrets.QUAY_IO_USERNAME }}
|
|
|
|
QUAY_IO_PASSWORD: ${{ secrets.QUAY_IO_PASSWORD }}
|
2022-01-21 15:55:03 +01:00
|
|
|
run: >
|
2022-07-01 13:25:19 +02:00
|
|
|
./mvnw clean install -B -pl debezium-connector-oracle -am -Pinfinispan-buffer,oracle-docker,oracle-tests
|
2023-10-05 13:10:58 +02:00
|
|
|
-Ddocker.username="$QUAY_IO_USERNAME"
|
|
|
|
-Ddocker.password="$QUAY_IO_PASSWORD"
|
|
|
|
-Dformat.formatter.goal=validate
|
|
|
|
-Dformat.imports.goal=check
|
|
|
|
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
|
|
|
-Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
|
|
|
|
|
|
|
|
test-rest-extension:
|
|
|
|
name: Oracle Connect REST Extension
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [check]
|
|
|
|
if: ${{ needs.check.outputs.HAS_QUAY_IO == 'true' }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout Action
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Get Date
|
|
|
|
id: get-date
|
|
|
|
run: |
|
|
|
|
echo "date=$(/bin/date -u "+%Y-%m")" >> $GITHUB_OUTPUT
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Set up Java 17
|
|
|
|
uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
distribution: 'temurin'
|
|
|
|
java-version: 17
|
|
|
|
|
|
|
|
# This workflow uses its own dependency cache rather than the main debezium workflow cache because
|
|
|
|
# we explicitly want to trigger this build on pushes separate from the other workflow.
|
|
|
|
- name: Cache Maven Repository
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ~/.m2/repository
|
|
|
|
# refresh cache every month to avoid unlimited growth
|
|
|
|
# we do not explicitly base this on POM changes since we are explicitly targeting a single connector
|
|
|
|
# and the likelihood that lots of dependencies will change that impacts Oracle is significantly low
|
|
|
|
# compared to other parts of Debezium that rely on frameworks such as Quarkus.
|
|
|
|
key: maven-oracle-${{ steps.get-date.outputs.date }}
|
|
|
|
restore-keys: |
|
|
|
|
maven-oracle-${{ steps.get-date.outputs.date }}
|
|
|
|
|
|
|
|
- name: Build and Install Debezium dependencies
|
|
|
|
run: >
|
|
|
|
./mvnw clean install -pl debezium-bom,debezium-core,:debezium-ide-configs,:debezium-checkstyle,:debezium-revapi -am
|
|
|
|
-DskipTests=true
|
|
|
|
-DskipITs=true
|
2022-01-21 15:55:03 +01:00
|
|
|
-Dformat.formatter.goal=validate
|
|
|
|
-Dformat.imports.goal=check
|
2023-10-05 13:10:58 +02:00
|
|
|
-Dhttp.keepAlive=false
|
|
|
|
-Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
|
|
|
|
|
|
|
|
- name: Build and Test Debezium Connector Oracle REST Extension
|
|
|
|
env:
|
|
|
|
QUAY_IO_USERNAME: ${{ secrets.QUAY_IO_USERNAME }}
|
|
|
|
QUAY_IO_PASSWORD: ${{ secrets.QUAY_IO_PASSWORD }}
|
|
|
|
run: >
|
|
|
|
./mvnw clean install -B -pl debezium-connector-oracle -am -Poracle-tests,rest-assembly
|
|
|
|
-Dregistry.username="$QUAY_IO_USERNAME"
|
|
|
|
-Dregistry.password="$QUAY_IO_PASSWORD"
|
|
|
|
-Dformat.formatter.goal=validate
|
|
|
|
-Dformat.imports.goal=check
|
|
|
|
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
2022-01-21 15:55:03 +01:00
|
|
|
-Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
|