From b8c525059bcd93617bf6ea95855aa8dd0f1f08f6 Mon Sep 17 00:00:00 2001 From: Tony Garrard Date: Thu, 24 Sep 2020 10:15:04 +0100 Subject: [PATCH 1/2] Add github workflow Add a workflow to build and upload a release Also change pom to build version 1.3.1 to include new version of kafka Signed-off-by: A. Garrard --- .github/workflows/github-build-release.yml | 45 ++++++++++++++++++++++ pom.xml | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/github-build-release.yml diff --git a/.github/workflows/github-build-release.yml b/.github/workflows/github-build-release.yml new file mode 100644 index 0000000..4259069 --- /dev/null +++ b/.github/workflows/github-build-release.yml @@ -0,0 +1,45 @@ +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' # Push events to matching semver, i.e. 10.0.0 + +name: Build and create release + +jobs: + build: + name: Build and upload release binary + #if: github.event.base_ref == 'refs/heads/master' # only run if on master branch + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Get java-version + run: | + BUILD_VERSION=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout ) + echo "::set-env name=VERSION::$BUILD_VERSION" + - name: Build + run: mvn package + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./target/kafka-connect-mq-sink-${{env.VERSION}}-jar-with-dependencies.jar + asset_name: kafka-connect-mq-sink-${{env.VERSION}}-jar-with-dependencies.jar + asset_content_type: application/java-archive diff --git a/pom.xml b/pom.xml index 808928f..d77b200 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ com.ibm.eventstreams.connect kafka-connect-mq-sink jar - 1.3.0 + 1.3.1 kafka-connect-mq-sink IBM Corporation From 40e872b7fb24d9f415465dd3cb96bb985578367d Mon Sep 17 00:00:00 2001 From: Tony Garrard Date: Thu, 24 Sep 2020 11:07:13 +0100 Subject: [PATCH 2/2] Add github version Need to also update hardcoded version in sink class Signed-off-by: A. Garrard --- .../com/ibm/eventstreams/connect/mqsink/MQSinkConnector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ibm/eventstreams/connect/mqsink/MQSinkConnector.java b/src/main/java/com/ibm/eventstreams/connect/mqsink/MQSinkConnector.java index f0b33be..a5d1427 100644 --- a/src/main/java/com/ibm/eventstreams/connect/mqsink/MQSinkConnector.java +++ b/src/main/java/com/ibm/eventstreams/connect/mqsink/MQSinkConnector.java @@ -143,7 +143,7 @@ public class MQSinkConnector extends SinkConnector { public static final String CONFIG_DOCUMENTATION_MQ_USER_AUTHENTICATION_MQCSP = "Whether to use MQ connection security parameters (MQCSP)."; public static final String CONFIG_DISPLAY_MQ_USER_AUTHENTICATION_MQCSP = "User authentication using MQCSP"; - public static String VERSION = "1.3.0"; + public static String VERSION = "1.3.1"; private Map configProps;