diff --git a/.github/workflows/pr_test.yml b/.github/workflows/pr_test.yml
index a847eb2c8..59b7c8d9c 100644
--- a/.github/workflows/pr_test.yml
+++ b/.github/workflows/pr_test.yml
@@ -3,152 +3,180 @@ name: mop mvn build check and ut
on:
pull_request:
branches:
- - branch-*
- - master
+ - branch-*
+ - master
paths-ignore:
- - 'docs/**'
- - 'README.md'
+ - 'docs/**'
+ - 'README.md'
push:
branches:
- - branch-*
- - master
+ - branch-*
+ - master
paths-ignore:
- - 'docs/**'
- - 'README.md'
+ - 'docs/**'
+ - 'README.md'
jobs:
check:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: s4u/maven-settings-action@v2.6.0
+ with:
+ servers: '[{"id": "ossrh", "username": "${{ secrets.SONATYPE_USERNAME }}",
+ "password": "${{ secrets.SONATYPE_PASSWORD }}"}]'
+ - name: Login to cloudsmith
+ run: docker login -u="${{ secrets.CLOUDSMITH_USERNAME }}" -p="${{ secrets.CLOUDSMITH_API_KEY
+ }}" docker.cloudsmith.io
+ - uses: actions/checkout@v2
- - name: Cache Maven packages
- uses: actions/cache@v2
- with:
- path: ~/.m2
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: ${{ runner.os }}-m2
+ - name: Cache Maven packages
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
- - name: Set up JDK 1.8
- uses: actions/setup-java@v1
- with:
- java-version: 1.8
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
- - name: License check
- run: mvn license:check
+ - name: License check
+ run: mvn license:check
- - name: Build with Maven skipTests
- run: mvn clean install -DskipTests
+ - name: Build with Maven skipTests
+ run: mvn clean install -DskipTests
- - name: Style check
- run: mvn checkstyle:check
+ - name: Style check
+ run: mvn checkstyle:check
- - name: Spotbugs check
- run: mvn spotbugs:check
+ - name: Spotbugs check
+ run: mvn spotbugs:check
scan:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- - uses: actions/checkout@v2
-
- - name: Get All Tests
- id: list-test
- run: |
- TESTS=`find tests/src/test/java/io/streamnative/pulsar/handlers/mqtt \
- mqtt-impl/src/test/java/io/streamnative/pulsar/handlers/mqtt -name "*Test.java" | \
- awk -F "/" '{ print $NF }' | \
- awk -F "." '{ print $1 }' | \
- jq -R -s -c 'split("\n") | map(select(. != ""))'`
- echo "::set-output name=tests::$(echo $TESTS)"
+ - uses: s4u/maven-settings-action@v2.6.0
+ with:
+ servers: '[{"id": "ossrh", "username": "${{ secrets.SONATYPE_USERNAME }}",
+ "password": "${{ secrets.SONATYPE_PASSWORD }}"}]'
+ - name: Login to cloudsmith
+ run: docker login -u="${{ secrets.CLOUDSMITH_USERNAME }}" -p="${{ secrets.CLOUDSMITH_API_KEY
+ }}" docker.cloudsmith.io
+ - uses: actions/checkout@v2
+
+ - name: Get All Tests
+ id: list-test
+ run: |
+ TESTS=`find tests/src/test/java/io/streamnative/pulsar/handlers/mqtt \
+ mqtt-impl/src/test/java/io/streamnative/pulsar/handlers/mqtt -name "*Test.java" | \
+ awk -F "/" '{ print $NF }' | \
+ awk -F "." '{ print $1 }' | \
+ jq -R -s -c 'split("\n") | map(select(. != ""))'`
+ echo "::set-output name=tests::$(echo $TESTS)"
outputs:
tests: ${{ steps.list-test.outputs.tests }}
test:
- needs: [ scan, check ]
+ needs: [scan, check]
strategy:
matrix:
test: ${{ fromJson(needs.scan.outputs.tests) }}
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- - uses: actions/checkout@v2
-
- - name: Cache Maven packages
- uses: actions/cache@v2
- with:
- path: ~/.m2
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: ${{ runner.os }}-m2
-
- - name: Set up JDK 1.8
- uses: actions/setup-java@v1
- with:
- java-version: 1.8
-
- - name: Build with Maven skipTests
- run: mvn clean install -DskipTests
-
- - name: Test after build
- run: ./scripts/retry.sh mvn -B -ntp test -Dtest=${{ matrix.test }} -DfailIfNoTests=false
-
- - name: Upload jacoco artifact
- uses: actions/upload-artifact@v2
- with:
- name: ${{ matrix.test }}-jacoco-artifact
- path: '**/*.exec'
- retention-days: 2
-
- - name: package surefire artifacts
- if: failure()
- run: |
- rm -rf artifacts
- mkdir artifacts
- find . -type d -name "*surefire*" -exec cp --parents -R {} artifacts/ \;
- zip -r ${{ matrix.test }}-artifacts.zip artifacts
- - uses: actions/upload-artifact@master
- name: upload surefire-artifacts
- if: failure()
- with:
- name: surefire-artifacts
- path: ${{ matrix.test }}-artifacts.zip
+ - uses: s4u/maven-settings-action@v2.6.0
+ with:
+ servers: '[{"id": "ossrh", "username": "${{ secrets.SONATYPE_USERNAME }}",
+ "password": "${{ secrets.SONATYPE_PASSWORD }}"}]'
+ - name: Login to cloudsmith
+ run: docker login -u="${{ secrets.CLOUDSMITH_USERNAME }}" -p="${{ secrets.CLOUDSMITH_API_KEY
+ }}" docker.cloudsmith.io
+ - uses: actions/checkout@v2
+
+ - name: Cache Maven packages
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+
+ - name: Build with Maven skipTests
+ run: mvn clean install -DskipTests
+
+ - name: Test after build
+ run: ./scripts/retry.sh mvn -B -ntp test -Dtest=${{ matrix.test }} -DfailIfNoTests=false
+
+ - name: Upload jacoco artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ matrix.test }}-jacoco-artifact
+ path: '**/*.exec'
+ retention-days: 2
+
+ - name: package surefire artifacts
+ if: failure()
+ run: |
+ rm -rf artifacts
+ mkdir artifacts
+ find . -type d -name "*surefire*" -exec cp --parents -R {} artifacts/ \;
+ zip -r ${{ matrix.test }}-artifacts.zip artifacts
+ - uses: actions/upload-artifact@master
+ name: upload surefire-artifacts
+ if: failure()
+ with:
+ name: surefire-artifacts
+ path: ${{ matrix.test }}-artifacts.zip
build:
needs: test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- - uses: actions/checkout@v2
-
- - name: Cache Maven packages
- uses: actions/cache@v2
- with:
- path: ~/.m2
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: ${{ runner.os }}-m2
-
- - name: Set up JDK 1.8
- uses: actions/setup-java@v1
- with:
- java-version: 1.8
-
- - name: Build with Maven skipTests
- run: mvn clean install -DskipTests
-
- - name: Download jacoco artifact
- uses: actions/download-artifact@v2
- with:
- path: mqtt-impl/target
-
- - name: Merge jacoco report
- run: mvn jacoco:merge
-
- - name: Generate jacoco report
- run: mvn jacoco:report
-
- - name: Upload test report
- run: bash <(curl -s https://codecov.io/bash)
+ - uses: s4u/maven-settings-action@v2.6.0
+ with:
+ servers: '[{"id": "ossrh", "username": "${{ secrets.SONATYPE_USERNAME }}",
+ "password": "${{ secrets.SONATYPE_PASSWORD }}"}]'
+ - name: Login to cloudsmith
+ run: docker login -u="${{ secrets.CLOUDSMITH_USERNAME }}" -p="${{ secrets.CLOUDSMITH_API_KEY
+ }}" docker.cloudsmith.io
+ - uses: actions/checkout@v2
+
+ - name: Cache Maven packages
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+
+ - name: Build with Maven skipTests
+ run: mvn clean install -DskipTests
+
+ - name: Download jacoco artifact
+ uses: actions/download-artifact@v2
+ with:
+ path: mqtt-impl/target
+
+ - name: Merge jacoco report
+ run: mvn jacoco:merge
+
+ - name: Generate jacoco report
+ run: mvn jacoco:report
+
+ - name: Upload test report
+ run: bash <(curl -s https://codecov.io/bash)
diff --git a/.github/workflows/release-note.yml b/.github/workflows/release-note.yml
index 14fc27626..dc26bc69e 100644
--- a/.github/workflows/release-note.yml
+++ b/.github/workflows/release-note.yml
@@ -3,17 +3,24 @@ name: MoP Release Notes
on:
push:
branches:
- - master
+ - master
path-ignores:
- - 'docs/**'
- - 'README.md'
+ - 'docs/**'
+ - 'README.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- - name: release note
- uses: toolmantim/release-drafter@v5.2.0
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - uses: s4u/maven-settings-action@v2.6.0
+ with:
+ servers: '[{"id": "ossrh", "username": "${{ secrets.SONATYPE_USERNAME }}",
+ "password": "${{ secrets.SONATYPE_PASSWORD }}"}]'
+ - name: Login to cloudsmith
+ run: docker login -u="${{ secrets.CLOUDSMITH_USERNAME }}" -p="${{ secrets.CLOUDSMITH_API_KEY
+ }}" docker.cloudsmith.io
+ - name: release note
+ uses: toolmantim/release-drafter@v5.2.0
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index d3c88d0e6..b9d0d56f7 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,32 +1,39 @@
name: mqttop Release
on:
- release:
+ release: null
jobs:
upload:
name: Upload Release files
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v1
- - name: Set up JDK 1.8
- uses: actions/setup-java@v1
- with:
- java-version: 1.8
+ - uses: s4u/maven-settings-action@v2.6.0
+ with:
+ servers: '[{"id": "ossrh", "username": "${{ secrets.SONATYPE_USERNAME }}",
+ "password": "${{ secrets.SONATYPE_PASSWORD }}"}]'
+ - name: Login to cloudsmith
+ run: docker login -u="${{ secrets.CLOUDSMITH_USERNAME }}" -p="${{ secrets.CLOUDSMITH_API_KEY
+ }}" docker.cloudsmith.io
+ - uses: actions/checkout@v1
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
- - name: build
- run: |
- version=`./scripts/dev/get-project-version.py`
- mvn clean install -DskipTests
- rm -rf pulsar-protocol-*
- cp mqtt-impl/target/pulsar-protocol-handler-mqtt-${version}.nar ./
- cp README.md ./pulsar-protocol-handler-mqtt-readme.md
- echo "ls pulsar-protocol-*"
- ls pulsar-protocol-*
+ - name: build
+ run: |
+ version=`./scripts/dev/get-project-version.py`
+ mvn clean install -DskipTests
+ rm -rf pulsar-protocol-*
+ cp mqtt-impl/target/pulsar-protocol-handler-mqtt-${version}.nar ./
+ cp README.md ./pulsar-protocol-handler-mqtt-readme.md
+ echo "ls pulsar-protocol-*"
+ ls pulsar-protocol-*
- - name: publish
- uses: skx/github-action-publish-binaries@release-0.11
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- args: 'pulsar-protocol-*'
+ - name: publish
+ uses: skx/github-action-publish-binaries@release-0.11
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ args: 'pulsar-protocol-*'
diff --git a/mqtt-impl/pom.xml b/mqtt-impl/pom.xml
index 40c693461..17aaba367 100644
--- a/mqtt-impl/pom.xml
+++ b/mqtt-impl/pom.xml
@@ -20,7 +20,7 @@
pulsar-protocol-handler-mqtt-parent
io.streamnative.pulsar.handlers
- 2.9.2.14
+ 2.9.3.14-rc-iterable
4.0.0
pulsar-protocol-handler-mqtt
diff --git a/pom.xml b/pom.xml
index e4e056788..4bbd8ef96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,4 +1,4 @@
-
+
-
- io.streamnative.pulsar.handlers
- pulsar-protocol-handler-mqtt-parent
- 2.9.2.14
- StreamNative :: Pulsar Protocol Handler :: MoP Parent
- Parent for MQTT on Pulsar implemented using Pulsar Protocol Handler.
-
-
- org.apache
- apache
- 18
-
- 4.0.0
- pom
-
-
- mqtt-impl
- tests
-
-
-
-
- Apache License, Version 2.0
- http://www.apache.org/licenses/LICENSE-2.0.txt
- repo
-
-
-
-
- 1.18.4
- 2.22.0
- 6.14.3
- 4.0.2
- 2.9.2.14
- 4.1.74.Final
- 2.17.1
- 1.18.4
- 1.16
- 1.2.2
- 1.9.4
- 1.45.1
-
- 1.8
- 8.37
- 3.8.0
- 3.0.0-M1
- true
- 3.0.rc1
- 3.1.2
- 3.1.8
- 0.8.7
-
-
-
-
- io.streamnative
- pulsar-broker
- ${pulsar.version}
- provided
-
-
- io.grpc
- grpc-all
-
-
- io.grpc
- grpc-core
-
-
- io.grpc
- grpc-testing
-
-
- io.grpc
- grpc-auth
-
-
-
-
-
- io.grpc
- grpc-all
- ${grpc.version}
- provided
-
-
-
- org.apache.logging.log4j
- log4j-core
- ${log4j2.version}
-
-
- org.apache.logging.log4j
- log4j-slf4j-impl
- ${log4j2.version}
-
-
- org.projectlombok
- lombok
- ${lombok.version}
-
-
- io.netty
- netty-codec-mqtt
- ${mqtt.codec.version}
-
-
- commons-beanutils
- commons-beanutils
- ${apache.commons.bean-utils.version}
-
-
- org.testng
- testng
- ${testng.version}
- test
-
-
- org.awaitility
- awaitility
- ${awaitility.version}
- test
-
-
- org.mockito
- mockito-core
- ${mockito.version}
- test
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-checkstyle-plugin
- ${maven-checkstyle-plugin.version}
-
-
- com.puppycrawl.tools
- checkstyle
- ${puppycrawl.checkstyle.version}
-
-
-
- resources/checkstyle.xml
- resources/suppressions.xml
- UTF-8
- true
- true
- false
- true
-
-
-
- checkstyle
- validate
-
- check
-
-
-
-
-
-
-
-
- com.github.spotbugs
- spotbugs-maven-plugin
- ${spotbugs-maven-plugin.version}
-
- resources/findbugsExclude.xml
-
-
-
- maven-compiler-plugin
- ${maven-compiler-plugin.version}
-
-
- ${javac.target}
-
-
+ 1.8
+ 8.37
+ 3.8.0
+ 3.0.0-M1
+ true
+ 3.0.rc1
+ 3.1.2
+ 3.1.8
+ 0.8.7
+
+
+
+ io.streamnative
+ pulsar-broker
+ ${pulsar.version}
+ provided
+
+
+ io.grpc
+ grpc-all
+
+
+ io.grpc
+ grpc-core
+
+
+ io.grpc
+ grpc-testing
+
+
+ io.grpc
+ grpc-auth
+
+
+
+
+ io.grpc
+ grpc-all
+ ${grpc.version}
+ provided
+
+
+ org.apache.logging.log4j
+ log4j-core
+ ${log4j2.version}
+
+
+ org.apache.logging.log4j
+ log4j-slf4j-impl
+ ${log4j2.version}
+
+
+ org.projectlombok
+ lombok
+ ${lombok.version}
+
+
+ io.netty
+ netty-codec-mqtt
+ ${mqtt.codec.version}
+
+
+ commons-beanutils
+ commons-beanutils
+ ${apache.commons.bean-utils.version}
+
+
+ org.testng
+ testng
+ ${testng.version}
+ test
+
+
+ org.awaitility
+ awaitility
+ ${awaitility.version}
+ test
+
+
+ org.mockito
+ mockito-core
+ ${mockito.version}
+ test
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-checkstyle-plugin
+ ${maven-checkstyle-plugin.version}
+
+
+ com.puppycrawl.tools
+ checkstyle
+ ${puppycrawl.checkstyle.version}
+
+
+
+ resources/checkstyle.xml
+ resources/suppressions.xml
+ UTF-8
+ true
+ true
+ false
+ true
+
+
+
+ checkstyle
+ validate
+
+ check
+
+
+
+
+
+
+
+
+ com.github.spotbugs
+ spotbugs-maven-plugin
+ ${spotbugs-maven-plugin.version}
+
+ resources/findbugsExclude.xml
+
+
+
+ maven-compiler-plugin
+ ${maven-compiler-plugin.version}
+
+
+ ${javac.target}
+
+
- -Xlint:deprecation
- -Xlint:unchecked
-
- -Xpkginfo:always
-
-
-
-
-
- maven-surefire-plugin
- ${maven-surefire-plugin.version}
-
- @{argLine}
+ -Xlint:deprecation
+ -Xlint:unchecked
+
+ -Xpkginfo:always
+
+
+
+
+ maven-surefire-plugin
+ ${maven-surefire-plugin.version}
+
+ @{argLine}
-Xmx2G
-Dpulsar.allocator.pooled=false
-Dpulsar.allocator.leak_detection=Advanced
-Dlog4j.configurationFile="log4j2.xml"
- false
- 1
- ${redirectTestOutputToFile}
- false
-
-
-
-
- com.mycila
- license-maven-plugin
- ${license-maven-plugin.version}
-
- resources/license.template
-
-
- LICENSE
- NOTICE
- Jenkinsfile
- resources/license.template
- **/build/**
- **/ahc.properties
- **/.idea/**
- **/.github/**
-
-
- JAVADOC_STYLE
- DOUBLESLASH_STYLE
- SCRIPT_STYLE
- SCRIPT_STYLE
- SCRIPT_STYLE
- SCRIPT_STYLE
- SCRIPT_STYLE
- SCRIPT_STYLE
- SCRIPT_STYLE
- JAVADOC_STYLE
- XML_STYLE
- SCRIPT_STYLE
- JAVADOC_STYLE
- SCRIPT_STYLE
- SCRIPT_STYLE
-
-
-
-
-
- org.codehaus.mojo
- templating-maven-plugin
- 1.0.0
-
-
- filtering-java-templates
-
- filter-sources
-
-
-
-
-
-
- pl.project13.maven
- git-commit-id-plugin
- 4.0.0
-
-
- get-the-git-infos
-
- revision
-
- initialize
-
-
-
- true
-
+ false
+ 1
+ ${redirectTestOutputToFile}
+ false
+
+
+
+ com.mycila
+ license-maven-plugin
+ ${license-maven-plugin.version}
+
+ resources/license.template
+
+ LICENSE
+ NOTICE
+ Jenkinsfile
+ resources/license.template
+ **/build/**
+ **/ahc.properties
+ **/.idea/**
+ **/.github/**
+
+
+ JAVADOC_STYLE
+ DOUBLESLASH_STYLE
+ SCRIPT_STYLE
+ SCRIPT_STYLE
+ SCRIPT_STYLE
+ SCRIPT_STYLE
+ SCRIPT_STYLE
+ SCRIPT_STYLE
+ SCRIPT_STYLE
+ JAVADOC_STYLE
+ XML_STYLE
+ SCRIPT_STYLE
+ JAVADOC_STYLE
+ SCRIPT_STYLE
+ SCRIPT_STYLE
+
+
+
+
+ org.codehaus.mojo
+ templating-maven-plugin
+ 1.0.0
+
+
+ filtering-java-templates
+
+ filter-sources
+
+
+
+
+
+ pl.project13.maven
+ git-commit-id-plugin
+ 4.0.0
+
+
+ get-the-git-infos
+
+ revision
+
+ initialize
+
+
+
+ true
+
${project.build.outputDirectory}/git.properties
-
- ^git.build.(host|time|version)$
- ^git.commit.id.(abbrev|full)$
- ^git.dirty$
- ^git.build.user.(email|name)$
-
- full
-
-
-
-
- org.jacoco
- jacoco-maven-plugin
- ${maven-jacoco-plugin.version}
-
-
- **/pulsar/**
-
-
-
- ${project.build.directory}
-
- **/*.exec
-
-
-
-
-
-
-
- prepare-agent
-
-
-
- report
-
- report
-
- none
-
-
- merge-all-jacoco
-
- merge
-
- none
-
-
-
-
-
-
-
-
-
- central
- default
- https://repo1.maven.org/maven2
-
-
-
-
- false
-
- bintray-yahoo-maven
- bintray
- https://yahoo.bintray.com/maven
-
-
+
+ ^git.build.(host|time|version)$
+ ^git.commit.id.(abbrev|full)$
+ ^git.dirty$
+ ^git.build.user.(email|name)$
+
+ full
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${maven-jacoco-plugin.version}
+
+
+ **/pulsar/**
+
+
+
+ ${project.build.directory}
+
+ **/*.exec
+
+
+
+
+
+
+
+ prepare-agent
+
+
+
+ report
+
+ report
+
+ none
+
+
+ merge-all-jacoco
+
+ merge
+
+ none
+
+
+
+
+
+
+
+ central
+ default
+ https://repo1.maven.org/maven2
+
+
+
+ false
+
+ bintray-yahoo-maven
+ bintray
+ https://yahoo.bintray.com/maven
+
+
+ ossrh
+ https://s01.oss.sonatype.org/service/local/repositories/iostreamnative-1693/content
+
+
+
+
+ ossrh
+ https://s01.oss.sonatype.org/content/repositories/snapshots
+
+
+ ossrh
+ https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
diff --git a/tests/pom.xml b/tests/pom.xml
index fe9544ab9..8867ebfef 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -20,7 +20,7 @@
pulsar-protocol-handler-mqtt-parent
io.streamnative.pulsar.handlers
- 2.9.2.14
+ 2.9.3.14-rc-iterable
4.0.0
pulsar-protocol-handler-mqtt-tests