Skip to content

Commit

Permalink
Added release-droid requirements (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
morazow authored May 6, 2021
1 parent 47c2889 commit a6d6753
Show file tree
Hide file tree
Showing 11 changed files with 129 additions and 69 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release_droid_prepare_original_checksum.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release Droid - Prepare Original Checksum

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- name: Assembly with SBT
run: sbt assembly
- name: Running tests
run: sbt test it:test
- name: Prepare checksum
run: find target/scala*/stripped -name *.jar -exec sha256sum "{}" + > original_checksum
- name: Upload checksum to the artifactory
uses: actions/upload-artifact@v2
with:
name: original_checksum
retention-days: 5
path: original_checksum
19 changes: 19 additions & 0 deletions .github/workflows/release_droid_print_quick_checksum.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release Droid - Print Quick Checksum

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- name: Assembly with SBT skipping tests
run: sbt assembly
- name: Prepare checksum
run: echo 'checksum_start==';find target/scala*/stripped -name *.jar -exec sha256sum "{}" + | xargs;echo '==checksum_end'
26 changes: 26 additions & 0 deletions .github/workflows/release_droid_upload_github_release_assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release Droid - Upload GitHub Release Assets

on:
workflow_dispatch:
inputs:
upload_url:
description: 'Upload URL'
required: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- name: Assembly with SBT skipping tests
run: sbt assembly
- name: Upload assets to the GitHub release draft
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: target/scala*/stripped/*.jar
49 changes: 4 additions & 45 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,63 +16,22 @@ env:
before_install:
- git fetch --tags
- docker pull exasol/docker-db:latest
- docker pull exasol/docker-db:6.2.7-d1
- docker pull exasol/docker-db:6.2.14-d1

matrix:
include:
- jdk: oraclejdk11
scala: 2.12.11
scala: 2.13.5

- jdk: openjdk11
scala: 2.12.11

- jdk: oraclejdk11
scala: 2.13.3

- jdk: openjdk11
scala: 2.13.3
env: RELEASE=true
scala: 2.13.5

script:
- travis_wait 30 ./scripts/ci.sh
- ./scripts/ci.sh

after_success:
- ./sbtx coveralls

before_deploy:
- echo "Ensure assembly jar file is created for a $TRAVIS_TAG"
- ./sbtx clean assembly
- export JAR_VERSION=${TRAVIS_TAG}
- echo "Jar artifact version $JAR_VERSION"
- mkdir -p artifacts
- cp target/scala-2.13/exasol-kafka-connector-extension-${JAR_VERSION}.jar artifacts/
- echo "Create SHA256 Checksum"
- cd artifacts
- sha256sum exasol-kafka-connector-extension-${JAR_VERSION}.jar > checksum.sha256.txt
- cd ../
- ls -lh artifacts/

deploy:
provider: releases
api_key:
secure: |-
BZYwbVYGcA0yQ3JvC6SCB0otKsuY/u7aF/ajlLqrpAcu1w+ucs77kvceNAjPUzkhBthaagJXGfURQU71DEebjL9Nynl
/UWHMnwx7wonbNOH3lvTSo/LTkw0XcW9rH55rJtBHmMTdzZ0EMaDTdoetuv3TNVK8Fv6j0Me55+SO+Ch3e1taLNa/3E
mu1Z4mVL6+lEgbBMcrDM639DbhyJWpJ3dcp48U9TXoyXKvAAiW3MrSo3EvBuRDyhOeooEoT2/9R0VaFURrjEVv+dq1R
u4SriQ/To4OcWXQGyGO09BkEJwI3qZiPY78+yysGUUl6g6DX6f/k3FcadM0cdZ5yDU3yk9FtdqELTEAXYV7e7sNfktu
1oaEy6/gsaw+36nUjGVWC73Wu5BdJg9O0G5HL8uv5UzQRHLebecogJlTXKwJwrPkNiinvvgACtsr/++2SshFH0VOsVO
+t9MvNBKbmU8TjtEvB0gvzqmmzjo1nyy81Dg20+Gvfc2wQAjkmDJ6YR2VblpSAxtaBrGm70MoEIKa0kTeRetEa1i4T3
KwRFCj0pqMhpVf7HFO232FscrcLv6l1DCCGDUbn1lPZSHECYYLYVgueIUYZEQAW7t0AZDlpss7yvKsHg+bqnp/CknW3
2i11sPvH7ggvf3CmSlN0PykCK3fErTNm9xdkYp48UyfG14=
file:
- artifacts/exasol-kafka-connector-extension-${JAR_VERSION}.jar
- artifacts/checksum.sha256.txt
skip_cleanup: true
on:
repo: exasol/kafka-connector-extension
tags: true
condition: $RELEASE = true && $TRAVIS_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?$

cache:
directories:
- "$HOME/.sbt/1.0"
Expand Down
7 changes: 4 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ lazy val orgSettings = Seq(
)

lazy val buildSettings = Seq(
scalaVersion := "2.13.3",
crossScalaVersions := Seq("2.12.12", "2.13.3")
scalaVersion := "2.13.5",
crossScalaVersions := Seq("2.12.13", "2.13.5")
)

lazy val root =
project
.in(file("."))
.settings(moduleName := "exasol-kafka-connector-extension")
.settings(version := "1.0.0")
.settings(orgSettings)
.settings(buildSettings)
.settings(Settings.projectSettings(scalaVersion))
Expand All @@ -26,6 +27,6 @@ lazy val root =
libraryDependencies ++= Dependencies.AllDependencies,
excludeDependencies ++= Dependencies.ExcludedDependencies
)
.enablePlugins(IntegrationTestPlugin, GitVersioning)
.enablePlugins(IntegrationTestPlugin, GitVersioning, ReproducibleBuildsPlugin)

addCommandAlias("pluginUpdates", ";reload plugins;dependencyUpdates;reload return")
37 changes: 26 additions & 11 deletions doc/changes/changes_1.0.0.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,39 @@
# Kafka Connector Extension 1.0.0, released 2020-12-DD
# Kafka Connector Extension 1.0.0, released 2021-05-06

## Features / Improvements
Code name: v1.0.0 - Support for JSON Records import and offset reset strategy

## Summary

The release `1.0.0` added support for importing JSON records and consumer offset reset strategy. By using offset strategy consumer imports new records after topic retention.

## Features

* #24: Added support for importing JSON records (PR #25).
* Added support for offset reset strategy (PR #26).

## Bugfixes

* #20: Fixed the typo in the CI deployment (PR #21)
* #20: Fixed the typo in the CI deployment (PR #21).

### Runtime Dependency Updates

* Updated to `sbt.version:1.4.4` (was `1.4.2`)
* Updated to Scala version `2.12.12` (was `2.12.11`) for cross compilation
* Updated to `io.confluent:kafka-avro-serializer:6.0.1` (was `6.0.0`)
* Updated to `org.scala-lang.modules:scala-collection-compat:2.3.1` (was `2.2.0`)
* Updated `sbt.version:1.4.2` to `1.4.4`
* Updated Scala version `2.12.11` to `2.12.13` for cross compilation
* Updated `org.apache.kafka:kafka-clients:2.6.0` to `2.8.0`
* Updated `io.confluent:kafka-avro-serializer:6.0.0` to `6.1.1`
* Updated `org.scala-lang.modules:scala-collection-compat:2.2.0` to `2.4.3`

### Test Dependency Updates

* Updated to `org.mockito:mockito-core:3.6.28` (was `3.6.0`)
* Updated `org.scalatest:scalatest:3.2.3` to `3.2.8`
* Updated `org.mockito:mockito-core:3.6.0` to `3.9.0`
* Updated `io.github.embeddedkafka:embedded-kafka-schema-registry:6.0.0` to `6.1.1`

### Plugin Updates

* Updated to `org.wartremover:sbt-wartremover:2.4.13` (was `2.4.12`)
* Updated to `org.wartremover:sbt-wartremover-contib:1.3.11` (was `1.3.10`)
* Updated to `com.github.cb372:sbt-explicit-dependencies:0.2.16` (was `0.2.15`)
* Updated `com.timushev.sbt:sbt-updates:0.5.1` to `0.5.3`
* Updated `org.scoverage:sbt-scoverage:1.6.1` to `1.7.3`
* Updated `org.wartremover:sbt-wartremover:2.4.12` to `2.4.13`
* Updated `org.wartremover:sbt-wartremover-contib:1.3.10` to `1.3.11`
* Updated `com.github.cb372:sbt-explicit-dependencies:0.2.15` to `0.2.16`

12 changes: 6 additions & 6 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ object Dependencies {

// Runtime dependencies versions
private val ImportExportUDFVersion = "0.2.0"
private val KafkaClientsVersion = "2.6.0"
private val KafkaAvroSerializerVersion = "6.0.1"
private val ScalaCollectionCompatVersion = "2.3.1"
private val KafkaClientsVersion = "2.8.0"
private val KafkaAvroSerializerVersion = "6.1.1"
private val ScalaCollectionCompatVersion = "2.4.3"

// Test dependencies versions
private val ScalaTestVersion = "3.2.3"
private val ScalaTestVersion = "3.2.8"
private val ScalaTestPlusVersion = "1.0.0-M2"
private val MockitoCoreVersion = "3.6.28"
private val KafkaSchemaRegistryVersion = "6.0.0"
private val MockitoCoreVersion = "3.9.0"
private val KafkaSchemaRegistryVersion = "6.1.1"

val Resolvers: Seq[Resolver] = Seq(
"jitpack.io" at "https://jitpack.io",
Expand Down
8 changes: 6 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0")

// Adds Scala Code Coverage (Scoverage) used during unit tests
// http://github.com/scoverage/sbt-scoverage
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.7.3")

// Adds SBT Coveralls plugin for uploading Scala code coverage to
// https://coveralls.io
Expand All @@ -27,7 +27,7 @@ addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.7")
// Adds a `dependencyUpdates` task to check Maven repositories for
// dependency updates
// http://github.com/rtimush/sbt-updates
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.1")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.3")

// Adds a `scalafmt` task for automatic source code formatting
// https://github.com/lucidsoftware/neo-sbt-scalafmt
Expand All @@ -49,6 +49,10 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
// https://github.com/cb372/sbt-explicit-dependencies
addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16")

// Adds a `sbt-reproducible-builds` plugin
// https://github.com/raboof/sbt-reproducible-builds
addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.25")

// Setup this and project/project/plugins.sbt for formatting
// project/*.scala files with scalafmt
inThisBuild(
Expand Down
2 changes: 1 addition & 1 deletion project/project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ addSbtPlugin("com.lucidchart" % "sbt-scalafmt-coursier" % "1.16")

// Used to get updates for plugins
// see https://github.com/rtimush/sbt-updates/issues/10
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.0")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.3")
9 changes: 9 additions & 0 deletions release_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
community-tags:
- Apache Kafka
- Exasol Streaming Connector
- Open Source
- GitHub
community-project-name: Kafka Connector Extension
community-project-description: |
The [kafka-connector-extension](https://github.com/exasol/kafka-connector-extension)
supports accessing Apache Kafka and importing data from Kafka topic.
2 changes: 1 addition & 1 deletion scripts/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o errtrace -o nounset -o pipefail -o errexit
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )"
cd "$BASE_DIR"

MAIN_SCALA_VERSION=2.13.3
MAIN_SCALA_VERSION=2.13.5

if [[ -z "${TRAVIS_SCALA_VERSION:-}" ]]; then
echo "Environment variable TRAVIS_SCALA_VERSION is not set"
Expand Down

0 comments on commit a6d6753

Please sign in to comment.