Skip to content

Commit 07277a8

Browse files
committed
implement deployment of the flink connector
1 parent 6ec4fc9 commit 07277a8

File tree

3 files changed

+106
-3
lines changed

3 files changed

+106
-3
lines changed

.github/workflows/release.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy Application
2+
name: Release
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
version:
8+
description: "Release version"
9+
required: true
10+
jobs:
11+
release:
12+
name: Build and Publish ClickHouse Flink Connector
13+
runs-on: ubuntu-latest
14+
permissions: write-all
15+
steps:
16+
- uses: actions/checkout@v3
17+
if: env.SKIP_STEP != 'true'
18+
- name: Set up JDK 17
19+
if: env.SKIP_STEP != 'true'
20+
uses: actions/setup-java@v3
21+
with:
22+
java-version: '17'
23+
distribution: 'adopt'
24+
architecture: x64
25+
- name: Build shadowJar
26+
if: env.SKIP_STEP != 'true'
27+
uses: gradle/gradle-build-action@v2
28+
with:
29+
arguments: shadowJar
30+
- name: Deploy
31+
if: env.SKIP_STEP != 'true'
32+
uses: gradle/gradle-build-action@v2
33+
env:
34+
NMCP_USERNAME: ${{ secrets.NMCP_USERNAME }}
35+
NMCP_PASSWORD: ${{ secrets.NMCP_PASSWORD }}
36+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
37+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
38+
with:
39+
arguments: publishMavenPublicationToCentralPortal

flink-connector-clickhouse-base/build.gradle.kts

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ plugins {
77
`maven-publish`
88
scala
99
java
10+
signing
11+
id("com.gradleup.nmcp") version "0.0.8"
1012
id("com.github.johnrengelman.shadow") version "8.1.1"
1113
}
1214

@@ -149,11 +151,67 @@ tasks.jar {
149151
publishing {
150152
publications {
151153
create<MavenPublication>("maven") {
152-
//from(components["java"])
153154
artifact(tasks.shadowJar)
154-
groupId = "org.apache.flink.connector"
155-
artifactId = "clickhouse"
155+
groupId = "com.clickhouse.flink"
156+
artifactId = "connector"
156157
version = sinkVersion
158+
pom {
159+
name.set("ClickHouse Flink Connector")
160+
description.set("Official Apache Flink connector for ClickHouse")
161+
url.set("https://github.com/ClickHouse/flink-connector-clickhouse")
162+
163+
licenses {
164+
license {
165+
name.set("The Apache License, Version 2.0")
166+
url.set("https://github.com/ClickHouse/flink-connector-clickhouse/blob/main/LICENSE")
167+
}
168+
}
169+
170+
developers {
171+
developer {
172+
id.set("mzitnik")
173+
name.set("Mark Zitnik")
174+
email.set("[email protected]")
175+
}
176+
developer {
177+
id.set("BentsiLeviav")
178+
name.set("Bentsi Leviav")
179+
email.set("[email protected]")
180+
}
181+
}
182+
183+
scm {
184+
connection.set("[email protected]:ClickHouse/flink-connector-clickhouse.git")
185+
url.set("https://github.com/ClickHouse/flink-connector-clickhouse")
186+
}
187+
188+
organization {
189+
name.set("ClickHouse")
190+
url.set("https://clickhouse.com")
191+
}
192+
193+
issueManagement {
194+
system.set("GitHub Issues")
195+
url.set("https://github.com/ClickHouse/flink-connector-clickhouse/issues")
196+
}
197+
}
157198
}
158199
}
159200
}
201+
202+
//signing {
203+
// val signingKey = System.getenv("SIGNING_PASSWORD")
204+
// val signingPassword = System.getenv("SIGNING_KEY")
205+
// if (signingKey != null && signingPassword != null) {
206+
// useInMemoryPgpKeys(signingKey, signingPassword)
207+
// }
208+
// sign(publishing.publications["maven"])
209+
//}
210+
211+
nmcp {
212+
publish("maven") {
213+
username = System.getenv("NMCP_USERNAME")
214+
password = System.getenv("NMCP_PASSWORD")
215+
publicationType = "AUTOMATIC"
216+
}
217+
}

gradle.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@
33

44
org.gradle.configuration-cache=true
55

6+
# if debugging gradle tasks is needed (enable 3 lines below)
7+
8+
#org.gradle.logging.level=debug
9+
#systemProp.org.slf4j.simpleLogger.log.org.apache.http=DEBUG
10+
#systemProp.org.slf4j.simpleLogger.log.org.apache.http.wire=DEBUG
11+

0 commit comments

Comments
 (0)