Skip to content

Commit

Permalink
[RFR-405] Upgrade dependencies (#156)
Browse files Browse the repository at this point in the history
* Upgrade mongo to 5.0.16 (also do this in collector-docker)

* Upgrade dependencies

* Update CI workflows (auto-update version)

* Update readme

* Upgrade dependencies
  • Loading branch information
hb0 committed Apr 21, 2023
1 parent b4cd780 commit 905736c
Show file tree
Hide file tree
Showing 13 changed files with 267 additions and 193 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/build.yml → .github/workflows/gradle_build.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
name: Standard CI
# This workflow ensures the building step works
#
# @author Armin Schnabel
# @since 1.0.0
name: Gradle Build

on:
push:
branches:
- main
- release
pull_request:
branches:
- main
- release

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Checkout commit
uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/gradle_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow publishes a new version to the Github Registry.
#
# @author Armin Schnabel
# @since 1.0.0
name: Gradle Publish

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout commit
uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

# version is required to publish artifacts to Github Registry
- name: Set version
run: |
sed -i "s/version = \"0.0.0\"/version = \"${{ github.ref_name }}\"/g" build.gradle.kts
sed -i "s/ version: 0.0.0/ version: ${{ github.ref_name }}/g" src/main/resources/webroot/api/openapi.yml
sed -i "s/ version: 0.0.0/ version: ${{ github.ref_name }}/g" src/main/resources/webroot/management/openapi.yml
# Publish slim JARS to Github Package Registry
- name: Publish package
run: ./gradlew publish
env:
USERNAME: ${{ github.actor }}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}

# Automatically mark this tag as release on Github
- name: Mark tag as release on Github
uses: actions/create-release@v1
id: create_release
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
# Release tags of format `1.2.3-beta1 / -alpha1 / -test1` are considered a pre-release
prerelease: ${{ contains(github.ref, 'test') || contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 0 additions & 34 deletions .github/workflows/publish-jar.yml

This file was deleted.

31 changes: 10 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Module collector

![https://vertx.io](https://img.shields.io/badge/vert.x-4.3.6-purple.svg)
![https://mongodb.com/](https://img.shields.io/badge/mongo-5.0.8-purple.svg)
![https://github.com/cyface-de/data-collector/actions](https://github.com/cyface-de/data-collector/workflows/Cyface%20Data%20Collector/badge.svg)
![https://mongodb.com/](https://img.shields.io/badge/mongo-5.0.16-purple.svg)
![https://github.com/cyface-de/data-collector/actions](https://github.com/cyface-de/data-collector/actions/workflows/gradle_build.yml/badge.svg)

This application represents the [Cyface](https://cyface.de) data collector software.

Expand Down Expand Up @@ -196,23 +196,12 @@ To load files from the Mongo GridFS file storage use the [Mongofiles](https://do

To release a new version:

1. *Create a new release branch* following the format `release-x.y.z`.
`x.y.z` is the number of the new version following [Semantic Versioning](http://semver.org).

2. *Increase version numbers* in root `build.gradle`, and optionally in any associated `docker-compose.yml` or OpenAPI documentation (usually located in `src/main/resources/webroot/openapi.yml`).

3. *Commit version bump and push branch* to GitHub.
a. Wait until the continuous integration system passes.
b. Create a Pull Request from your `release-x.y.z` branch to `release`.
c. Get the Pull Request accepted and squash it.

4. *Tag the new release on the main branch*. Follow the guidelines from ["Keep a Changelog"](https://keepachangelog.com) in your tag description.

5. *Push the release tag to GitHub*. The docker image and GitHub packages are automatically published when a new version is tagged and pushed by our
[GitHub Actions](https://github.com/cyface-de/data-collector/actions) to the
[GitHub Registry](https://github.com/cyface-de/data-collector/packages).

6. *Mark the released version as 'new Release' on [GitHub](https://github.com/cyface-de/data-collector/releases)*.
* `version`s in root `build.gradle` and `src/main/resources/webroot/*/openapi.yml` are automatically set by the CI
* Just tag the new release version on the `main` branch. Follow the guidelines from ["Keep a Changelog"](https://keepachangelog.com) in your tag description
* Push the release tag to GitHub. The artifacts are automatically published when a new version is tagged and pushed by our
[GitHub Actions](https://github.com/cyface-de/data-collector/actions) to the
[GitHub Registry](https://github.com/cyface-de/data-collector/packages).
* The CI workflow automatically marks the release on Github


## Publishing artifacts to GitHub Packages manually
Expand All @@ -223,7 +212,7 @@ How to obtain these credentials is described [here](https://help.github.com/en/g

To publish a new version of an artifact you need to:

1. Increase the version number of the sub-project within the `build.gradle` file
1. Increase the version number of the subproject within the `build.gradle` file
2. Call `./gradlew publish`

This will upload a new artifact to GitHub packages with the new version.
Expand All @@ -236,7 +225,7 @@ This project uses [semantic versioning](https://semver.org/).
* MongoDb

## Licensing
Copyright 2018-2022 Cyface GmbH
Copyright 2018-2023 Cyface GmbH

This file is part of the Cyface Data Collector.

Expand Down
37 changes: 19 additions & 18 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2022 Cyface GmbH
* Copyright 2020-2023 Cyface GmbH
*
* This file is part of the Cyface Data Collector.
*
Expand Down Expand Up @@ -28,7 +28,7 @@ import java.net.URL
*
* @author Klemens Muthmann
* @author Armin Schnabel
* @version 1.1.0
* @version 1.1.1
* @since 1.0.0
*/
buildscript {
Expand All @@ -46,10 +46,10 @@ plugins {
id("eclipse")
id("idea")
//noinspection SpellCheckingInspection
id("com.github.johnrengelman.shadow").version("7.0.0")
id("com.github.johnrengelman.shadow").version("7.1.2")
// Plugin to display the Gradle task graph
//noinspection SpellCheckingInspection
id("org.barfuin.gradle.taskinfo").version("1.0.5")
id("org.barfuin.gradle.taskinfo").version("2.1.0")

@Suppress("ForbiddenComment")
// TODO: Remoe this as it only applies to Java
Expand All @@ -59,7 +59,7 @@ plugins {
kotlin("jvm").version("1.7.10")

// For static code checks
id("io.gitlab.arturbosch.detekt").version("1.21.0")
id("io.gitlab.arturbosch.detekt").version("1.22.0")
// For Generation of Documentation
id("org.jetbrains.dokka").version("1.7.10")
}
Expand All @@ -69,7 +69,7 @@ application {
}

group = "de.cyface"
version = "6.10.3"
version = "0.0.0" // Automatically overwritten by CI

val mainVerticleName = "de.cyface.collector.verticle.MainVerticle"
val watchForChange = "src/**/*"
Expand Down Expand Up @@ -106,26 +106,27 @@ tasks.withType<KotlinCompile>().configureEach {
extra["vertxVersion"] = "4.3.6"
// The following is only required since Vert.x GridFS Client is not working correctly in Version 4.3.3.
// To check this run GridFSStorageIT
// We reported the problem to Vertx Github. A fix is scheduled for Vertx 4.3.4
// We reported the problem to Vertx Github. A fix is scheduled for Vertx 4.4.2
// https://github.com/vert-x3/vertx-mongo-client/issues/291
extra["mongoDriverVersion"] = "4.8.0"
extra["micrometerVersion"] = "1.7.2"
extra["slf4jVersion"] = "1.7.29"
extra["micrometerVersion"] = "1.10.6"
extra["slf4jVersion"] = "2.0.7"
extra["commonsLangVersion"] = "3.12.0"
extra["logbackVersion"] = "1.2.5"
extra["cyfaceApiVersion"] = "2.0.1"
extra["cyfaceSerializationVersion"] = "2.2.1"
extra["gradleWrapperVersion"] = "7.5.1"
extra["googleCloudLibrariesVersion"] = "26.1.5"
extra["logbackVersion"] = "1.4.6"
extra["cyfaceApiVersion"] = "2.1.2"
extra["cyfaceSerializationVersion"] = "2.3.6"
extra["gradleWrapperVersion"] = "7.6.1"
extra["googleCloudLibrariesVersion"] = "26.12.0"

// Versions of testing dependencies
extra["junitVersion"] = "5.7.2"
extra["mockitoVersion"] = "4.7.0"
extra["junitVersion"] = "5.9.2"
extra["mockitoVersion"] = "5.2.0"
@Suppress("ForbiddenComment")
// TODO: Remove the following. It belongs to java and should be replaced by hamKrest
extra["hamcrestVersion"] = "2.2"
extra["hamKrestVersion"] = "1.8.0.1"
extra["flapdoodleVersion"] = "3.5.2"
extra["mockitoKotlinVersion"] = "4.0.0"
extra["flapdoodleVersion"] = "3.5.3" // major upgrade available
extra["mockitoKotlinVersion"] = "4.1.0"
extra["dokkaVersion"] = "1.7.10"
extra["detektVersion"] = "1.22.0"

Expand Down
2 changes: 1 addition & 1 deletion doc/index.html

Large diffs are not rendered by default.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 905736c

Please sign in to comment.