Skip to content

Commit

Permalink
Merge pull request #783 from thadguidry/add-snapshot-workflow
Browse files Browse the repository at this point in the history
Update POMs and add Snapshot workflow
  • Loading branch information
kdhrubo authored Nov 11, 2024
2 parents 8d5f70d + 57474da commit 10e4177
Show file tree
Hide file tree
Showing 18 changed files with 90 additions and 77 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish Snapshot to GitHub

on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish'
required: true
default: '1.3.0-SNAPSHOT'
ref:
description: 'Type the Branch, Tag or SHA to use for publishing Snapshot'
required: false
default: 'master'

permissions:
contents: read
packages: write

jobs:
build_snapshot:
name: Build Snapshot
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}

- name: Set up Java 21
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: 21
cache: 'maven'

- name: Compile & Deploy to GitHub Packages
run: mvn -Drevision=${{ github.event.inputs.version }} -B deploy --file pom.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ deliver context-aware, reasoning applications without any vendor lock-in. :bulb:

[Docker based installation guide](https://db2rest.com/docs/run-db2rest-on-docker).

# Building
Use `mvn verify` or `mvn clean package` , etc. from repo root folder, and pass in a value for `revision` to override the current default version in POMs:
`mvn -Drevision="1.5.4-SNAPSHOT" clean package -DskipTests`

# Testing
Running tests simply requires a Docker daemon running, where the build will automatically pull and run testcontainers for the database tests.

# Use Cases

Expand Down
10 changes: 1 addition & 9 deletions api-rest/pom-oracle9i.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
<parent>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>

<!-- lookup parent from repository -->
</parent>

<artifactId>db2rest-oracle9i</artifactId>
<version>1.2.4</version>
<packaging>jar</packaging>
<name>db2rest-oracle9i</name>
<description>db2rest-oracle9i</description>
Expand All @@ -21,13 +20,6 @@
<spring-restdocs.version>3.0.1</spring-restdocs.version>
</properties>

<distributionManagement>
<repository>
<id>central</id>
<url>https://central.sonatype.com</url>
</repository>
</distributionManagement>

<dependencies>

<dependency>
Expand Down
30 changes: 11 additions & 19 deletions api-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>

<!-- lookup parent from repository -->
Expand All @@ -16,76 +16,68 @@
<name>db2rest</name>
<description>db2rest</description>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/9tigerio/db2rest</url>
</repository>
</distributionManagement>

<dependencies>


<dependency>
<groupId>io.9tiger</groupId>
<artifactId>auth</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>


<dependency>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-common</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>


<dependency>
<groupId>io.9tiger</groupId>
<artifactId>rest-common</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.9tiger</groupId>
<artifactId>mongo-support</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.9tiger</groupId>
<artifactId>rdbms-support</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.9tiger</groupId>
<artifactId>pg-dialect</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.9tiger</groupId>
<artifactId>mysql-dialect</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.9tiger</groupId>
<artifactId>mariadb-dialect</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.9tiger</groupId>
<artifactId>oracle-dialect</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.9tiger</groupId>
<artifactId>mssql-dialect</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>

<!-- lookup parent from repository -->
Expand Down
2 changes: 1 addition & 1 deletion db2rest-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>

<!-- lookup parent from repository -->
Expand Down
6 changes: 2 additions & 4 deletions mariadb-dialect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>

<!-- lookup parent from repository -->
Expand All @@ -24,10 +24,8 @@
<dependency>
<groupId>io.9tiger</groupId>
<artifactId>rdbms-common</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>
</dependencies>



</project>
6 changes: 2 additions & 4 deletions mongo-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>

<!-- lookup parent from repository -->
Expand All @@ -25,11 +25,9 @@
<dependency>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-common</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>

</dependencies>



</project>
4 changes: 2 additions & 2 deletions mssql-dialect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
<!-- lookup parent from repository -->
</parent>
Expand All @@ -23,7 +23,7 @@
<dependency>
<groupId>io.9tiger</groupId>
<artifactId>rdbms-common</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>

<dependency>
Expand Down
6 changes: 2 additions & 4 deletions mysql-dialect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>

<!-- lookup parent from repository -->
Expand All @@ -23,10 +23,8 @@
<dependency>
<groupId>io.9tiger</groupId>
<artifactId>rdbms-common</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>
</dependencies>



</project>
6 changes: 2 additions & 4 deletions oracle-dialect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>

<!-- lookup parent from repository -->
Expand All @@ -25,10 +25,8 @@
<dependency>
<groupId>io.9tiger</groupId>
<artifactId>rdbms-common</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>
</dependencies>



</project>
5 changes: 2 additions & 3 deletions oracle9i-dialect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>

<!-- lookup parent from repository -->
Expand All @@ -21,11 +21,10 @@
<version>11.2.0.4</version>
</dependency>


<dependency>
<groupId>io.9tiger</groupId>
<artifactId>rdbms-common</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions pg-dialect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>

<!-- lookup parent from repository -->
Expand All @@ -30,7 +30,7 @@
<dependency>
<groupId>io.9tiger</groupId>
<artifactId>rdbms-common</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>io.9tiger</groupId>
<artifactId>db2rest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>${revision}</version>
<packaging>pom</packaging>
<name>DB2Rest parent</name>
<description>An Open Source instant REST Data API for databases. This is the DB2Rest parent Maven project.</description>
Expand Down Expand Up @@ -62,7 +62,7 @@
<!-- BEGIN MODULE LAYOUT -->

<properties>
<db2rest.version>0.3.2</db2rest.version>
<revision>1.3.0-SNAPSHOT</revision>
<java.version>21</java.version>
<spring-restdocs.version>3.0.1</spring-restdocs.version>
</properties>
Expand Down
4 changes: 2 additions & 2 deletions rdbms-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>

<!-- lookup parent from repository -->
Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>io.9tiger</groupId>
<artifactId>db2rest-common</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>

</dependencies>
Expand Down
Loading

0 comments on commit 10e4177

Please sign in to comment.