Skip to content

Commit

Permalink
Merge pull request #87 from rwth-acis/releases/v1.1.1
Browse files Browse the repository at this point in the history
Releases/v1.1.1 (Gradle & GitHub Actions)
  • Loading branch information
pedela authored Feb 19, 2021
2 parents 5795108 + 0cbd9cb commit 9fcd273
Show file tree
Hide file tree
Showing 42 changed files with 1,351 additions and 14,726 deletions.
81 changes: 0 additions & 81 deletions .classpath

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI with Gradle

# Triggers the workflow on push or pull request events (on every branch)
on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 14
uses: actions/setup-java@v1
with:
java-version: 14
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: las2peer
path: |
core/export/jars/las2peer-*.jar
restmapper/export/jars/las2peer-rest-mapper*.jar
webconnector/export/jars/las2peer-web-connector*.jar
bundle/export/jars/las2peer-bundle-*.jar
30 changes: 30 additions & 0 deletions .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow runs the deployJavadoc gradle task and then deploys the javadoc files to GitHub pages.

name: Deploy Javadoc

# Triggers the workflow on push to master
on:
push:
branches:
- master

jobs:
build-and-deploy-javadoc:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 14
uses: actions/setup-java@v1
with:
java-version: 14
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew deployJavadoc
- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages # deploy javadoc on gh-pages branch
folder: javadoc # folder that should be deployed
33 changes: 33 additions & 0 deletions .github/workflows/publish_to_archiva_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish artifacts as release to archiva

# Only run the workflow if it is started manually.
on: workflow_dispatch

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 14
uses: actions/setup-java@v1
with:
java-version: 14
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle and publish as release to archiva
env:
# set environment variable for release
LAS2PEER_RELEASE: "yes"
ARCHIVA_USERNAME: ${{ secrets.ARCHIVA_USERNAME }}
ARCHIVA_PASSWORD: ${{ secrets.ARCHIVA_PASSWORD }}
run: ./gradlew publish
- name: Upload artifacts on GitHub (attached to this workflow)
uses: actions/upload-artifact@v2
with:
name: las2peer
path: |
core/export/jars/las2peer-*.jar
restmapper/export/jars/las2peer-rest-mapper*.jar
webconnector/export/jars/las2peer-web-connector*.jar
bundle/export/jars/las2peer-bundle-*.jar
37 changes: 37 additions & 0 deletions .github/workflows/publish_to_archiva_snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish artifacts as snapshot to archiva

# Run workflow on publish to develop branch automatically.
# Also allow to run the workflow manually on every other branch.
on:
push:
branches:
- develop
workflow_dispatch:


jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 14
uses: actions/setup-java@v1
with:
java-version: 14
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle and publish as snapshot to archiva
env:
ARCHIVA_USERNAME: ${{ secrets.ARCHIVA_USERNAME }}
ARCHIVA_PASSWORD: ${{ secrets.ARCHIVA_PASSWORD }}
run: ./gradlew publish
- name: Upload artifacts on GitHub (attached to this workflow)
uses: actions/upload-artifact@v2
with:
name: las2peer
path: |
core/export/jars/las2peer-*.jar
restmapper/export/jars/las2peer-rest-mapper*.jar
webconnector/export/jars/las2peer-web-connector*.jar
bundle/export/jars/las2peer-bundle-*.jar
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ ivy.jar
*.secret
archiva_credentials.xml
/javadoc/
.gradle
.classpath
.project
.settings
23 changes: 0 additions & 23 deletions .project

This file was deleted.

32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![las2peer](img/logo/bitmap/las2peer-logo-128x128.png)

# [![Build Status](https://jenkins.dbis.rwth-aachen.de/buildStatus/icon?job=las2peer%20Core)](https://jenkins.dbis.rwth-aachen.de/job/las2peer%20Core/) [![Build Status](https://travis-ci.org/rwth-acis/las2peer.svg?branch=master)](https://travis-ci.org/rwth-acis/las2peer) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/rwth-acis/las2peer)
# [![Java CI with Gradle](https://github.com/rwth-acis/las2peer/workflows/Java%20CI%20with%20Gradle/badge.svg?branch=master)](https://github.com/rwth-acis/las2peer/actions?query=workflow%3A%22Java+CI+with+Gradle%22+branch%3Amaster) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/rwth-acis/las2peer)

las2peer is a Java-based server framework for developing and deploying microservices in a distributed Peer-to-Peer (P2P) environment.
It is developed by the Advanced Community Information Systems (ACIS) group at the Chair of Computer Science 5 (Information Systems & Databases), RWTH Aachen University, Germany.
Expand All @@ -24,7 +24,7 @@ las2peer uses **Java 14**.

### Build Dependencies

* Apache ant
* Gradle 6.8
* Node 8 / npm

## Project Structure
Expand All @@ -39,13 +39,11 @@ This repository contains three las2peer modules:

Each of them resides in its own subfolder, containing a build file providing the following tasks:

* `ant` or `ant main_jar` will build the respective jar of the submodule. The jars will be stored in `/export/jars`.
* `ant junit_tests` will run the respective JUnit tests. Test reports will be stored in `/tmp/test_reports`.
* `ant javadoc` will create the JavaDocs for the respective submodule. The results will be stored in `/export/javadoc`.
* `ant all` runs all the tasks from above.
* `ant deploy-local` deploys the respective submodule to the local Ivy repository. If you have set up a project to resolve dependencies from the local repository, you can conveniently test your local changes without pushing and publishing them.

Hint: If you want to build a module that depends on another module and you want to test them together, run `ant deploy-local` on the dependency!
* `gradle jar` will build the respective jar of the submodule. The jars will be stored in `/export/jars`.
* `gradle test` will run the respective JUnit tests. Test reports will be stored in `/build/reports`.
* `gradle javadoc` will create the JavaDocs for the respective submodule. The results will be stored in `/export/javadoc`.
* `gradle build` runs all the tasks from above.
* `gradle publish<submodule>PublicationToMavenLocal` publishes the respective submodule to the local maven repository. If you have set up a project to resolve dependencies from the local repository, you can conveniently test your local changes without pushing and publishing them.

### Bundle

Expand All @@ -55,17 +53,15 @@ The build script for the bundle can be found in `/bundle`.

The build script provides the following tasks:

* `ant` or `ant main_jar` will build the fat jar. The jar will be stored in `/export/jars`.
* `ant deploy-local` deploys the bundle to the local Ivy repository.

If you want to bundle your local changes, run `ant deploy-local` on all modules.
* `gradle shadowJar` will build the fat jar. The jar will be stored in `/export/jars`.
* `gradle publishBundlePublicationToMavenLocal` publishes the bundle to the local maven repository.

### Super Build Script

To make life easier for developers, this repository contains a build script for conveniently building multiple submodules.

* `ant` or `ant build-only` will run `deploy-local` on each submodule
* `ant all` will run `ant all` and `deploy-local` on each submodule
* `gradle buildOnly` will run `publish<submodule>PublicationToMavenLocal` on each submodule
* `gradle buildOnlyNoBundle` will run `publish<submodule>PublicationToMavenLocal` on each submodule except for the bundle

## Documentation

Expand All @@ -77,5 +73,5 @@ JavaDocs of the latest release can be found online:

## CI

Every commit to the develop branch is built by Jenkins and will be published as a snapshot to our Archiva.
Every commit to the develop branch is built by GitHub actions and will be published as a snapshot to our Archiva.
Releases are drafted from the master branch.
42 changes: 42 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// build all and publish locally
task buildOnly {
dependsOn ":core:publishCorePublicationToMavenLocal"
dependsOn ":restmapper:publishRestmapperPublicationToMavenLocal"
dependsOn ":webconnector:publishWebconnectorPublicationToMavenLocal"
dependsOn ":bundle:publishBundlePublicationToMavenLocal"
}

// build all (without bundle) and publish locally
task buildOnlyNoBundle {
dependsOn ":core:publishCorePublicationToMavenLocal"
dependsOn ":restmapper:publishRestmapperPublicationToMavenLocal"
dependsOn ":webconnector:publishWebconnectorPublicationToMavenLocal"
}

// copy javadoc of all components into one single folder
task deployJavadoc {
dependsOn ":core:javadoc"
dependsOn ":restmapper:javadoc"
dependsOn ":webconnector:javadoc"
dependsOn "copyCoreDocs"
dependsOn "copyRestmapperDocs"
dependsOn "copyWebconnectorDocs"
}

task copyCoreDocs(type: Copy) {
dependsOn ":core:javadoc"
from "core/export/javadoc/"
into "javadoc/core"
}

task copyRestmapperDocs(type: Copy) {
dependsOn ":restmapper:javadoc"
from "restmapper/export/javadoc/"
into "javadoc/restmapper"
}

task copyWebconnectorDocs(type: Copy) {
dependsOn ":webconnector:javadoc"
from "webconnector/export/javadoc/"
into "javadoc/webconnector"
}
Loading

0 comments on commit 9fcd273

Please sign in to comment.