Skip to content

Commit

Permalink
Refactored Eclipse Dash License Tool workflow usage according to sugg…
Browse files Browse the repository at this point in the history
…estions

Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
  • Loading branch information
Coduz committed Sep 28, 2022
1 parent d9cc975 commit 5391f7c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ env:
MAVEN_OPTS: "-Xmx4096m"

jobs:
build-kapua:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # Checks out a copy of the repository on the ubuntu-latest machine
Expand All @@ -25,15 +26,8 @@ jobs:
- run: mvn -v
- run: mvn -B ${BUILD_OPTS} -DskipTests clean install
- run: bash <(curl -s https://codecov.io/bash)
license-check:
# Documentation: https://github.com/eclipse/dash-licenses#reusable-github-workflow-for-automatic-license-check-and-ip-team-review-requests
uses: eclipse/dash-licenses/.github/workflows/mavenLicenseCheck.yml@master
with:
projectId: iot.kapua
secrets:
gitlabAPIToken: ${{ secrets.KAPUA_GITLAB_API_TOKEN }} # We should ask Eclipse to add this secret at some point. Currently, we do not want to do automatic license vetting submission.
test-brokerAcl:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -54,7 +48,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @brokerAcl" verify
- run: bash <(curl -s https://codecov.io/bash)
test-tag:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -75,7 +69,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @tag" verify
- run: bash <(curl -s https://codecov.io/bash)
test-broker:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -96,7 +90,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @broker" verify
- run: bash <(curl -s https://codecov.io/bash)
test-device:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -117,7 +111,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @device" verify
- run: bash <(curl -s https://codecov.io/bash)
test-device-management:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -138,7 +132,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @deviceManagement" verify
- run: bash <(curl -s https://codecov.io/bash)
test-connection:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -159,7 +153,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @connection" verify
- run: bash <(curl -s https://codecov.io/bash)
test-datastore:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -180,7 +174,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @datastore" verify
- run: bash <(curl -s https://codecov.io/bash)
test-user:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -201,7 +195,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @user" verify
- run: bash <(curl -s https://codecov.io/bash)
test-security:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -222,7 +216,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @security" verify
- run: bash <(curl -s https://codecov.io/bash)
test-jobs:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -243,7 +237,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @jobs" verify
- run: bash <(curl -s https://codecov.io/bash)
test-triggerService:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -264,7 +258,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @triggerService" verify
- run: bash <(curl -s https://codecov.io/bash)
test-account:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -285,7 +279,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @account" verify
- run: bash <(curl -s https://codecov.io/bash)
test-jobEngineStepDefinitions:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -306,7 +300,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @jobEngineStepDefinitions" verify
- run: bash <(curl -s https://codecov.io/bash)
test-jobEngineStartOfflineDevice:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -327,7 +321,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @jobEngineStartOfflineDevice" verify
- run: bash <(curl -s https://codecov.io/bash)
test-jobEngineStartOnlineDevice:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -348,7 +342,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @jobEngineStartOnlineDevice" verify
- run: bash <(curl -s https://codecov.io/bash)
test-jobEngineRestartOfflineDevice:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -369,7 +363,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @jobEngineRestartOfflineDevice" verify
- run: bash <(curl -s https://codecov.io/bash)
test-jobEngineRestartOnlineDevice:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -390,7 +384,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @jobEngineRestartOnlineDevice" verify
- run: bash <(curl -s https://codecov.io/bash)
test-jobEngineRestartOnlineDeviceSecondPart:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -411,7 +405,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @jobEngineRestartOnlineDeviceSecondPart" verify
- run: bash <(curl -s https://codecov.io/bash)
test-jobEngineServiceStop:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -432,7 +426,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.options="--tags @jobEngineServiceStop" verify
- run: bash <(curl -s https://codecov.io/bash)
junit-tests:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -453,7 +447,7 @@ jobs:
command: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='org.eclipse.kapua.qa.markers.junit.JUnitTests' verify
- run: bash <(curl -s https://codecov.io/bash)
build-javadoc:
needs: build-kapua
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/license-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: License Checking
on:
push:
branches:
- 'develop'
- 'release-**'
pull_request:
branches:
- 'develop'
- 'release-**'
issue_comment:
types: [created]

jobs:
# Documentation: https://github.com/eclipse/dash-licenses#reusable-github-workflow-for-automatic-license-check-and-ip-team-review-requests
eclipse-dash-license-tool-run:
# if: ${{ github.event.issue.pull_request }}
name: Eclipse Dash License Tool
uses: eclipse/dash-licenses/.github/workflows/mavenLicenseCheck.yml@master
with:
projectId: iot.kapua
secrets:
gitlabAPIToken: ${{ secrets.KAPUA_GITLAB_API_TOKEN }} # We should ask Eclipse to add this secret at some point. Currently, we do not want to do automatic license vetting submission.

0 comments on commit 5391f7c

Please sign in to comment.