Skip to content

Commit

Permalink
[DBZ-PGYB] Add plugin to package connector in a ZIP file (#157)
Browse files Browse the repository at this point in the history
This PR changes the following:
1. Adds a plugin to the pom.xml file to package the connector according
to Confluent specifications
2. Adds a GitHub pipeline to automate the above packaging process
  • Loading branch information
vaibhav-yb authored Sep 17, 2024
1 parent 16ead43 commit 3ca8afd
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/yb-confluent-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Create package for Confluent

on:
workflow_dispatch:
inputs:
version:
description: "Version of the connector to be packaged"
required: true
type: string
isSnapshotBuild:
description: "Snapshot build?"
required: true
type: boolean
default: false

permissions: write-all

jobs:
build:
name: "Create YugabyteDBConnector package for"
runs-on: ubuntu-latest
steps:
- name: Checkout Action
uses: actions/checkout@v4

- name: Set up Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17

- name: Set version for release
run: ./mvnw versions:set -DnewVersion=${{ inputs.version }}

- name: Compile jar file
run: ./mvnw clean install -Dquick -pl debezium-connector-postgres -pl debezium-bom -pl support/ide-configs -am
- name: Create GitHub release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ inputs.version }}
release_name: Release ${{ inputs.version }}
draft: true
prerelease: ${{ inputs.isSnapshotBuild }}
- name: Upload zip package GitHub release
id: upload-zip-package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./debezium-connector-postgres/target/components/packages/yugabyte-debezium-connector-yugabytedb-${{ inputs.version }}.zip
asset_name: yugabyte-debezium-connector-yugabytedb-${{ inputs.version }}.zip
asset_content_type: application/zip
Binary file added debezium-connector-postgres/logos/yugabytedb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions debezium-connector-postgres/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,70 @@

<build>
<plugins>
<plugin>
<groupId>io.confluent</groupId>
<version>0.12.0</version>
<artifactId>kafka-connect-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>kafka-connect</goal>
</goals>
<configuration>
<title>Kafka Connect YugabyteDB</title>
<documentationUrl>https://docs.yugabyte.com/preview/explore/change-data-capture/using-logical-replication/yugabytedb-connector/</documentationUrl>
<description>
The YugabyteDB Connector is based on the Debezium API, and captures row-level changes in the schemas of a YugabyteDB database using the PostgreSQL replication protocol.

The first time it connects to a YugabyteDB server, the connector takes a consistent snapshot of all schemas. After that snapshot is complete, the connector continuously captures row-level changes that insert, update, and delete database content, and that were committed to a YugabyteDB database.

The connector generates data change event records and streams them to Kafka topics. For each table, the default behavior is that the connector streams all generated events to a separate Kafka topic for that table. Applications and services consume data change event records from that topic.
</description>
<logo>logos/yugabytedb.png</logo>

<supportProviderName>Yugabyte Inc.</supportProviderName>
<supportSummary>Yugabyte supports the YugabyteDB source connector.</supportSummary>
<supportUrl>http://support.yugabyte.com/</supportUrl>
<supportLogo>logos/yugabytedb.png</supportLogo>

<ownerUsername>yugabyte</ownerUsername>
<ownerType>organization</ownerType>
<ownerName>Yugabyte Inc.</ownerName>
<ownerUrl>https://www.yugabyte.com//</ownerUrl>
<ownerLogo>logos/yugabytedb.png</ownerLogo>

<dockerNamespace>quay.io/yugabyte</dockerNamespace>
<dockerName>ybdb-debezium</dockerName>
<dockerTag>${project.version}</dockerTag>

<sourceUrl>https://github.com/yugabyte/debezium/tree/ybdb-debezium-2.5.2/debezium-connector-postgres</sourceUrl>

<componentTypes>
<componentType>source</componentType>
</componentTypes>

<tags>
<tag>Yugabyte</tag>
<tag>yugabytedb</tag>
<tag>source</tag>
<tag>cdc</tag>
<tag>wal</tag>
<tag>replication</tag>
</tags>

<requirements>
<requirement>YugabyteDB 2024.1.x</requirement>
</requirements>

<deliveryGuarantee>
<deliveryGuarantee>atLeastOnce</deliveryGuarantee>
</deliveryGuarantee>

<confluentControlCenterIntegration>true</confluentControlCenterIntegration>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down

0 comments on commit 3ca8afd

Please sign in to comment.