Skip to content

Commit

Permalink
Merge pull request #89 from RADAR-base/0.14.0
Browse files Browse the repository at this point in the history
Release 0.14.0
  • Loading branch information
blootsvoets authored Dec 23, 2021
2 parents 326885d + 3823ebc commit f0110af
Show file tree
Hide file tree
Showing 37 changed files with 505 additions and 737 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Continuous integration, including test and integration test
name: CI

# Run in master and dev branches and in all pull requests to those branches
on:
push:
branches: [ master, dev ]
pull_request: {}

jobs:
# Build and test the code
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache
uses: actions/cache@v2
with:
# Cache gradle directories
path: |
~/.gradle/caches
~/.gradle/wrapper
# Key for restoring and saving the cache
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', 'gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
# Compile the code
- name: Compile code
run: ./gradlew assemble

# Gradle check
- name: Check
run: ./gradlew check
49 changes: 49 additions & 0 deletions .github/workflows/publish_snapshots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Continuous integration, including test and integration test
name: Publish snapshots

# Run in master and dev branches and in all pull requests to those branches
on:
push:
branches: [ dev ]

jobs:
# Build and test the code
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Has SNAPSHOT version
id: is-snapshot
run: grep "version = '.*-SNAPSHOT'" build.gradle

- uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache
uses: actions/cache@v2
with:
# Cache gradle directories
path: |
~/.gradle/caches
~/.gradle/wrapper
# Key for restoring and saving the cache
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', 'gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Publish
env:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: ./gradlew -Psigning.gnupg.keyName=CBEF2CF0 -Psigning.gnupg.executable=gpg -Psigning.gnupg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} publish
53 changes: 53 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Create release files
name: Release

on:
release:
types: [published]

jobs:
upload:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache
uses: actions/cache@v2
with:
# Cache gradle directories
path: |
~/.gradle/caches
~/.gradle/wrapper
# Key for restoring and saving the cache
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', 'gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
# Compile code
- name: Compile code
run: ./gradlew assemble

# Upload it to GitHub
- name: Upload to GitHub
uses: AButler/upload-release-assets@v2.0
with:
files: 'radar-jersey/build/libs/*;radar-jersey-hibernate/build/libs/*'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Publish
env:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: ./gradlew -Psigning.gnupg.keyName=CBEF2CF0 -Psigning.gnupg.executable=gpg -Psigning.gnupg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} publish closeAndReleaseSonatypeStagingRepository
25 changes: 25 additions & 0 deletions .github/workflows/scheduled_snyk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Snyk scheduled test
on:
schedule:
- cron: '0 2 * * 1'
jobs:
security:
runs-on: ubuntu-latest
env:
REPORT_FILE: test.json
steps:
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/gradle-jdk11@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: test
args: --json-file-output=${{ env.REPORT_FILE }}
- name: Report new vulnerabilities
uses: thehyve/report-vulnerability@master
with:
report-file: ${{ env.REPORT_FILE }}
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ failure() }}
16 changes: 16 additions & 0 deletions .github/workflows/snyk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Snyk test
on:
pull_request:
branches:
- master
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/gradle-jdk11@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --severity-threshold=high
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repositories {
}
dependencies {
implementation group: 'org.radarbase', name: 'radar-commons', version: '0.13.2'
implementation group: 'org.radarbase', name: 'radar-commons', version: '0.14.0'
}
```

Expand Down Expand Up @@ -69,7 +69,7 @@ repositories {
}
dependencies {
implementation group: 'org.radarbase', name: 'radar-commons-server', version: '0.13.2'
implementation group: 'org.radarbase', name: 'radar-commons-server', version: '0.14.0'
}
```

Expand All @@ -82,19 +82,7 @@ repositories {
}
dependencies {
testImplementation group: 'org.radarbase', name: 'radar-commons-testing', version: '0.13.2'
}
```

Finally, if the schema registry is losing old schemas and your code is not recovering, include `radar-commons-unsafe`. Ensure that it comes in the classpath before any Confluent code. This will override the Confluent Avro deserializer to recover from failure when a message with unknown schema ID is passed.
```gradle
repositories {
mavenCentral()
maven { url 'https://packages.confluent.io/maven/' }
}
dependencies {
runtimeOnly group: 'org.radarbase', name: 'radar-commons-unsafe', version: '0.13.2'
testImplementation group: 'org.radarbase', name: 'radar-commons-testing', version: '0.14.0'
}
```

Expand All @@ -119,7 +107,7 @@ configurations.all {
}
dependencies {
compile group: 'org.radarbase', name: 'radar-commons', version: '0.13.3-SNAPSHOT'
compile group: 'org.radarbase', name: 'radar-commons', version: '0.14.1-SNAPSHOT'
}
```

Expand Down
29 changes: 8 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* limitations under the License.
*/
plugins {
id 'com.commercehub.gradle.plugin.avro' version '0.19.1'
id("io.github.gradle-nexus.publish-plugin") version "1.0.0"
id("com.github.ben-manes.versions") version "0.38.0"
id 'com.github.davidmc24.gradle.plugin.avro' version '1.3.0'
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
id("com.github.ben-manes.versions") version "0.39.0"
}

allprojects {
version = '0.13.2'
version = '0.14.0'
group = 'org.radarbase'
}

Expand All @@ -29,27 +29,14 @@ subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'idea'
apply plugin: 'com.github.ben-manes.versions'

targetCompatibility = '11'
sourceCompatibility = '11'

//---------------------------------------------------------------------------//
// Configuration //
//---------------------------------------------------------------------------//
ext.githubRepoName = 'RADAR-base/radar-commons'

ext.slf4jVersion = '1.7.30'
ext.kafkaVersion = '6.1.1-ce'
ext.avroVersion = '1.9.2'
ext.confluentVersion = '6.1.1'
ext.jacksonVersion = '2.12.3'
ext.jacksonYamlVersion = '2.12.3'
ext.okhttpVersion = '4.9.1'
ext.junitVersion = '4.13.2'
ext.mockitoVersion = '3.9.0'
ext.hamcrestVersion = '1.3'
ext.codacyVersion = '11.15.0'
ext.radarSchemasVersion = '0.6.0'
ext.orgJsonVersion = '20210307'

ext.githubUrl = "https://github.com/$githubRepoName"
ext.issueUrl = "https://github.com/$githubRepoName/issues"
ext.website = 'https://radar-base.org'
Expand Down Expand Up @@ -122,5 +109,5 @@ nexusPublishing {
}

wrapper {
gradleVersion '7.0'
gradleVersion '7.3.3'
}
Loading

0 comments on commit f0110af

Please sign in to comment.