Skip to content

Commit 83c5779

Browse files
authored
Merge pull request #2562 from ClickHouse/repo_fix_run_examples
[Repo] Fix run examples workflow
2 parents 4c15667 + 2d5f50a commit 83c5779

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

.github/workflows/run_examples.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ on:
88
required: false
99
default: 24.8
1010
client_version:
11-
description: ClickHouse Java Version
11+
description: Build Type
1212
type: choice
1313
options:
14-
- latest
15-
- pre_release
16-
pre_release_version:
17-
description: Client Release Version
14+
- head
15+
- nightly
16+
nightly_version:
17+
description: Nightly Version
1818
required: false
19-
default: 0.9.0
19+
default: 0.9.1-SNAPSHOT
2020

2121
concurrency:
2222
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.sha }}
@@ -25,7 +25,7 @@ concurrency:
2525

2626
jobs:
2727
run-examples-with-8-jdk-and-latest:
28-
if: github.event.inputs.client_version == 'latest'
28+
if: github.event.inputs.client_version == 'head'
2929
runs-on: ubuntu-latest
3030
timeout-minutes: 15
3131
name: Run Examples With HEAD on JVM 8
@@ -56,7 +56,7 @@ jobs:
5656
mvn --batch-mode --no-transfer-progress --show-version clean compile
5757
mvn --no-transfer-progress exec:java -Dexec.mainClass="com.clickhouse.examples.jdbc.Basic" -DchPassword=secret -DfailOnError=true
5858
run-examples-with-8-jdk-and-staging-release:
59-
if: github.event.inputs.client_version == 'pre_release'
59+
if: github.event.inputs.client_version == 'nightly'
6060
runs-on: ubuntu-latest
6161
timeout-minutes: 15
6262
name: Run Examples With Pre-Release on JVM 8
@@ -69,12 +69,11 @@ jobs:
6969
distribution: "temurin"
7070
java-version: 8
7171
cache: "maven"
72-
- name: Run Examples
72+
- name: Run JDBC Example
7373
run: |
7474
java -version
7575
docker run -d -q --name demo-service-db -e CLICKHOUSE_USER=default -e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 -e CLICKHOUSE_PASSWORD=secret -p 8123:8123 clickhouse/clickhouse-server:${{ github.event.inputs.ch_version }}
7676
cd examples/jdbc
77-
sed -i "s|<clickhouse-java.version>.*<\/clickhouse-java.version>|<clickhouse-java.version>${{ github.event.inputs.pre_release_version }}<\/clickhouse-java.version>|g" pom.xml
78-
sed -i "s|<url>https:\/\/s01\.oss\.sonatype\.org\/content\/repositories\/snapshots\/<\/url>|<url>https:\/\/s01\.oss\.sonatype\.org\/content\/groups\/staging\/<\/url>|g" pom.xml
77+
sed -i "s|<clickhouse-java.version>.*<\/clickhouse-java.version>|<clickhouse-java.version>${{ github.event.inputs.nightly_version }}<\/clickhouse-java.version>|g" pom.xml
7978
mvn --batch-mode --no-transfer-progress --show-version clean compile
8079
mvn --no-transfer-progress exec:java -Dexec.mainClass="com.clickhouse.examples.jdbc.Basic" -DchPassword=secret -DfailOnError=true

examples/jdbc/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,16 @@
3636

3737
<repositories>
3838
<repository>
39+
<!-- This repository will be used for snapshots. If you want to use a local build of clickhouse-java, you need to comment out this repository -->
3940
<id>ossrh</id>
4041
<name>Sonatype OSSRH</name>
4142
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
43+
<releases>
44+
<enabled>false</enabled>
45+
</releases>
46+
<snapshots>
47+
<enabled>true</enabled>
48+
</snapshots>
4249
</repository>
4350
</repositories>
4451

0 commit comments

Comments
 (0)