Skip to content

Commit

Permalink
Revert "Bump mop version to 2.9.2.18-rc-2022 (#637)" (#646)
Browse files Browse the repository at this point in the history
This reverts commit 6835c80.
  • Loading branch information
yaalsn authored May 28, 2022
1 parent 6835c80 commit 0ab5e5e
Show file tree
Hide file tree
Showing 6 changed files with 491 additions and 532 deletions.
272 changes: 118 additions & 154 deletions .github/workflows/pr_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,188 +3,152 @@ 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

- 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: License check
run: mvn license:check

env:
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- name: Build with Maven skipTests
run: mvn clean install -DskipTests

env:
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- name: Style check
run: mvn checkstyle:check

env:
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- name: Spotbugs check
run: mvn spotbugs:check


env:
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- 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: License check
run: mvn license:check

- name: Build with Maven skipTests
run: mvn clean install -DskipTests

- name: Style check
run: mvn checkstyle: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)"
env:
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- 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

env:
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- name: Test after build
run: ./scripts/retry.sh mvn -B -ntp test -Dtest=${{ matrix.test }} -DfailIfNoTests=false

env:
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- 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
env:
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- uses: actions/upload-artifact@master
name: upload surefire-artifacts
if: failure()
with:
name: surefire-artifacts
path: ${{ matrix.test }}-artifacts.zip
- 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

env:
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- name: Download jacoco artifact
uses: actions/download-artifact@v2
with:
path: mqtt-impl/target

- name: Merge jacoco report
run: mvn jacoco:merge

env:
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- name: Generate jacoco report
run: mvn jacoco:report

env:
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- name: Upload test report
run: bash <(curl -s https://codecov.io/bash)

env:
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- 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)

14 changes: 7 additions & 7 deletions .github/workflows/release-note.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ 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/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: release note
uses: toolmantim/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45 changes: 21 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
name: mqttop Release

on:
release: null
release:

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: 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-*
env:
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- name: publish
uses: skx/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: pulsar-protocol-*
- name: publish
uses: skx/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: 'pulsar-protocol-*'
2 changes: 1 addition & 1 deletion mqtt-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>pulsar-protocol-handler-mqtt-parent</artifactId>
<groupId>io.streamnative.pulsar.handlers</groupId>
<version>2.9.2.18-rc-2022</version>
<version>2.9.2.14</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pulsar-protocol-handler-mqtt</artifactId>
Expand Down
Loading

0 comments on commit 0ab5e5e

Please sign in to comment.