Skip to content

Commit

Permalink
Merge pull request #15 from singlestore-labs/PLAT-6940
Browse files Browse the repository at this point in the history
Created workflow for packaging connector
  • Loading branch information
AdalbertMemSQL authored Jan 10, 2024
2 parents 27fd152 + 49a2d90 commit 7429985
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ name: Java CI with Maven
on:
push:
branches: [ "main" ]
tags: "v*"
pull_request:
branches: [ "main" ]

Expand All @@ -37,7 +38,12 @@ jobs:
# Password or personal access token used to log against the Docker registry
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build with Maven
run: mvn -B package --file pom.xml
run: mvn -B package --file pom.xml -P assembly
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: target/singlestoredb-debezium-connector-*-plugin.tar.gz

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
Expand Down
55 changes: 55 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
<version.junit>4.13.2</version.junit>
<version.assertj-core>3.25.1</version.assertj-core>

<version.assembly.plugin>3.6.0</version.assembly.plugin>
<version.failsafe.plugin>3.2.3</version.failsafe.plugin>

<!--
Specify the properties that will be used for setting up the integration tests' Docker container.
Note that the `dockerhost.ip` property is computed from the IP address of DOCKER_HOST, which will
Expand Down Expand Up @@ -60,6 +63,7 @@
<groupId>org.apache.kafka</groupId>
<artifactId>connect-api</artifactId>
<version>${version.kafka}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.singlestore</groupId>
Expand Down Expand Up @@ -237,4 +241,55 @@
</plugins>
</build>

<profiles>
<profile>
<id>assembly</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${version.assembly.plugin}</version>
<dependencies>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-assembly-descriptors</artifactId>
<version>${version.debezium}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>default</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}</finalName>
<attach>true</attach> <!-- we want attach & deploy these to Maven -->
<descriptorRefs>
<descriptorRef>connector-distribution</descriptorRef>
</descriptorRefs>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${version.failsafe.plugin}</version>
<configuration>
<systemPropertyVariables>
<isAssemblyProfileActive>true</isAssemblyProfileActive>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 7429985

Please sign in to comment.