Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 57 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,36 @@ on:
pull_request:
branches: [master]
workflow_dispatch:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest
name: Test and build
container:
image: quay.io/ovirt/buildcontainer:el10stream

steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Run maven build
run: |
./autogen.sh
./configure
mvn test -P\!slow-tests-disabled

build-rpms:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
include:
- name: centos-stream-8
shortcut: cs8
container-name: el8stream
- name: centos-stream-9
shortcut: cs9
container-name: el9stream
- name: centos-stream-10
shortcut: cs10
container-name: el10stream

name: ${{ matrix.name }}

Expand All @@ -45,3 +60,41 @@ jobs:
uses: ovirt/upload-rpms-action@main
with:
directory: ${{ env.ARTIFACTS_DIR }}

publish-snapshot:
needs: build-rpms
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
name: Publish snapshot to maven central

container:
image: quay.io/ovirt/buildcontainer:el10stream

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Mark git repo as safe
run: git config --global --add safe.directory $(pwd)

- name: Use cache for maven
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Set up Maven settings.xml
uses: s4u/[email protected]
with:
path: /root/.m2/settings.xml
servers: |
[{
"id": "central",
"username": "${{ secrets.SONATYPE_USERNAME }}",
"password": "${{ secrets.SONATYPE_TOKEN }}"
}]

- name: Publish snapshot
run: mvn --batch-mode -DskipTests deploy
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
config.log
config.status
configure
configure~
install-sh
missing
Makefile
Expand Down Expand Up @@ -35,4 +36,3 @@ pom.xml

# Not autogenerated!
\!.copr/Makefile

24 changes: 0 additions & 24 deletions INSTALL

This file was deleted.

64 changes: 62 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,70 @@
# JSON RPC Java client (vdsm-jsonrpc-java) for oVirt

[![Copr build status](https://copr.fedorainfracloud.org/coprs/ovirt/ovirt-master-snapshot/package/vdsm-jsonrpc-java/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ovirt/ovirt-master-snapshot/package/vdsm-jsonrpc-java/)
[![Maven Central](https://img.shields.io/maven-central/v/org.ovirt.vdsm-jsonrpc-java/vdsm-jsonrpc-java-client.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/org.ovirt.vdsm-jsonrpc-java/vdsm-jsonrpc-java-client)

Welcome to the vdsm-jsonrpc-java source repository.

## Building from Source

This package uses the standard autotools build system.

### Prerequisites
- Java 11+ SDK
- Maven 3.6+
- autotools (autoconf, automake)

### Build Steps
```bash
$ autoreconf -ivf
$ ./configure
$ make
$ make install
```

The Java SDK artifacts are available for distribution-specific installation at `$(builddir)/target`.

### Maven Central Publishing

To create a new release available on Maven Central one should provide a settings.xml file in the .m2 folder following the structure:
```xml
<settings>
<servers>
<server>
<id>central</id>
<username>${mvn_central_generated_username}</username>
<password>${mvn_central_generated_pwd}</password>
</server>
</servers>
<profiles>
<profile>
<id>central</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg2</gpg.executable>
<gpg.passphrase>${gpg_passphrase}</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
```

After that all version tags need to be updated, that can be done using:

```bash
$ mvn release:prepare
```

For publishing artifacts to Maven Central (The `sign` profile is not required for SNAPSHOT versions):
```bash
$ mvn clean deploy -Psign
```

> [!NOTE]
> Snapshot versions do currently have a shelf life of 90 days on maven central.

## How to contribute

### Submitting patches
Expand All @@ -13,8 +74,7 @@ Patches are welcome!
Please submit patches to [GitHub:vdsm-jsonrpc-java](https://github.com/oVirt/vdsm-jsonrpc-java).

### Found a bug or documentation issue?
To submit a bug or suggest an enhancement for vdsm-jsonrpc-java please use
[oVirt Bugzilla for vdsm-jsonrpc-java product](https://bugzilla.redhat.com/enter_bug.cgi?product=vdsm-jsonrpc-java) or [GitHub issues](https://github.com/ovirt/vdsm-jsonrpc-java/issues)
To submit a bug or suggest an enhancement for vdsm-jsonrpc-java please use [GitHub issues](https://github.com/ovirt/vdsm-jsonrpc-java/issues)

If you find a documentation issue on the oVirt website please navigate and click "Report an issue on GitHub" in the page footer.

Expand Down
Loading