diff --git a/.github/workflows/conductor-workflow.yml b/.github/workflows/conductor-workflow.yml index c429d23..524dbfa 100644 --- a/.github/workflows/conductor-workflow.yml +++ b/.github/workflows/conductor-workflow.yml @@ -11,8 +11,58 @@ on: branches: - main jobs: + build_cache: + name: "Update Dependencies" + runs-on: ubuntu-latest + defaults: + run: + working-directory: debezium-platform-conductor + steps: + - name: Checkout core repository + uses: actions/checkout@v4 + with: + repository: debezium/debezium + ref: main + path: core + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '21' + # GitHub actions seem to struggle returning actions/cache cache-hit + # Directly use the cache action here to control whether to fetch dependencies + - id: maven-cache-check + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: maven-debezium-test-build-${{ hashFiles('core/**/pom.xml') }} + # Caches should be restored based on a logical order to minimize the build and test + # execution time. Here the logic is as follows: + # 1. Restore this PR's cache if the PR has previously been built + # 2. Restore the latest main cache if the core pom has not changed + # 3. Restore the latest main cache available + # This should minimize the download time required for updating dependencies + restore-keys: | + maven-debezium-test-build-${{ hashFiles('core/**/pom.xml') }} + maven-debezium-test-push-build-${{ hashFiles('core/**/pom.xml') }} + maven-debezium-test-push-build- + - name: Maven build core dependencies + run: > + mvnw clean install -f pom.xml + -DskipTests + -DskipITs + -Dformat.formatter.goal=validate + -Dformat.imports.goal=check + -Dhttp.keepAlive=false + -Dmaven.wagon.http.pool=false + -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 + -Dmaven.javadoc.skip=true + -Dstyle.color=always + --no-transfer-progress + -T4 check_style: name: "Checkstyle and Formatting" + needs: [ build_cache ] runs-on: ubuntu-latest defaults: run: @@ -32,8 +82,8 @@ jobs: uses: actions/cache@v4 with: path: ~/.m2/repository - key: maven-debezium-platform-test-build-${{ hashFiles('**/pom.xml') }} - restore-keys: maven-debezium-platform-test-build-${{ hashFiles('**/pom.xml') }} + key: maven-debezium-test-build-${{ hashFiles('core/**/pom.xml') }} + restore-keys: maven-debezium-test-build-${{ hashFiles('core/**/pom.xml') }} - name: "Checkstyle, Formatting, and Import Order Checks" run: > @@ -64,8 +114,8 @@ jobs: uses: actions/cache@v4 with: path: ~/.m2/repository - key: maven-debezium-platform-test-build-${{ hashFiles('**/pom.xml') }} - restore-keys: maven-debezium-platform-test-build-${{ hashFiles('**/pom.xml') }} + key: maven-debezium-test-build-${{ hashFiles('core/**/pom.xml') }} + restore-keys: maven-debezium-test-build-${{ hashFiles('core/**/pom.xml') }} - name: Run tests run: ./mvnw clean verify \ No newline at end of file diff --git a/debezium-platform-conductor/dist/assembly/conductor.xml b/debezium-platform-conductor/dist/assembly/conductor.xml new file mode 100644 index 0000000..96a3353 --- /dev/null +++ b/debezium-platform-conductor/dist/assembly/conductor.xml @@ -0,0 +1,33 @@ + + distribution + + tar.gz + zip + + + false + + + + ${dist.root.dir} + ${project.artifactId} + + README* + CHANGELOG* + CONTRIBUTE* + COPYRIGHT* + LICENSE* + + true + + + ${dist.app.source.dir} + ${project.artifactId} + + **/** + + + + \ No newline at end of file diff --git a/debezium-platform-conductor/pom.xml b/debezium-platform-conductor/pom.xml index 1fa4bf4..0fa4360 100644 --- a/debezium-platform-conductor/pom.xml +++ b/debezium-platform-conductor/pom.xml @@ -2,9 +2,16 @@ 4.0.0 - io.debezium + + + io.debezium + debezium-parent + 3.1.0-SNAPSHOT + + debezium-platform-conductor - 0.1.0-SNAPSHOT + 3.1.0-SNAPSHOT + 3.12.1 21 @@ -35,6 +42,10 @@ false + + ${project.basedir} + ${dist.root.dir}/target/quarkus-app + @@ -361,6 +372,8 @@ + + native @@ -374,5 +387,36 @@ native + + assembly + + + + org.apache.maven.plugins + maven-assembly-plugin + ${version.assembly.plugin} + + true + posix + + + + operator-package + package + + single + + + false + + dist/assembly/conductor.xml + + + + + + + + diff --git a/debezium-platform-conductor/src/main/resources/db/migration/V0.1.0__initial_database.sql b/debezium-platform-conductor/src/main/resources/db/migration/V3.1.0__initial_database.sql similarity index 100% rename from debezium-platform-conductor/src/main/resources/db/migration/V0.1.0__initial_database.sql rename to debezium-platform-conductor/src/main/resources/db/migration/V3.1.0__initial_database.sql