Fix worklows (#2458)

---------

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-06-16 17:22:21 +03:00
committed by GitHub
parent 4ead1b1e98
commit 66cc3aa418
3 changed files with 29 additions and 13 deletions

View File

@@ -29,6 +29,8 @@ jobs:
- name: Check file license headers - name: Check file license headers
run: mvn license:check -Plicense --batch-mode run: mvn license:check -Plicense --batch-mode
- name: Check dependency licenses with dash tool - name: Check dependency licenses with dash tool
run: mvn install -DskipTests license-tool:license-check -Plicense -Ddash.iplab.token=${GITLAB_API_TOKEN} --projects '!org.eclipse.hawkbit:hawkbit-repository-test,!org.eclipse.hawkbit:hawkbit-dmf-rabbitmq-test' --batch-mode run: |
mvn clean install -DskipTests -DskipJavadoc --batch-mode
mvn license-tool:license-check -DexcludeGroupIds=org.eclipse.hawkbit -Plicense -Ddash.iplab.token=${GITLAB_API_TOKEN} --projects '!org.eclipse.hawkbit:hawkbit-repository-test,!org.eclipse.hawkbit:hawkbit-dmf-rabbitmq-test'
env: env:
GITLAB_API_TOKEN: ${{ secrets.GITLAB_API_TOKEN }} GITLAB_API_TOKEN: ${{ secrets.GITLAB_API_TOKEN }}

View File

@@ -6,7 +6,7 @@ on:
inputs: inputs:
revision: revision:
description: 'Release version' description: 'Release version'
required: true default: '0-SNAPSHOT'
jobs: jobs:
release: release:
@@ -47,17 +47,27 @@ jobs:
${{ runner.os }}-maven- ${{ runner.os }}-maven-
- name: Check file license headers - name: Check file license headers
run: mvn license:check -Plicense --batch-mode run: mvn clean license:check -Plicense --batch-mode
- name: Check dependency licenses with dash tool - name: Check dependency licenses with dash tool
run: mvn install -DskipTests license-tool:license-check -Plicense -Ddash.iplab.token=${GITLAB_API_TOKEN} --projects '!org.eclipse.hawkbit:hawkbit-repository-test,!org.eclipse.hawkbit:hawkbit-dmf-rabbitmq-test' --batch-mode run: |
if [ "${REVISION}" = "0-SNAPSHOT" ]; then
DASH_FAIL=false
else
DASH_FAIL=true
fi
mvn install -DskipTests -DskipJavadoc --batch-mode
mvn license-tool:license-check -Plicense -Ddash.fail=${DASH_FAIL} -Ddash.iplab.token=${GITLAB_API_TOKEN} --projects '!org.eclipse.hawkbit:hawkbit-repository-test,!org.eclipse.hawkbit:hawkbit-dmf-rabbitmq-test' --batch-mode
env: env:
REVISION: ${{ github.event.inputs.revision }}
GITLAB_API_TOKEN: ${{ secrets.GITLAB_API_TOKEN }} GITLAB_API_TOKEN: ${{ secrets.GITLAB_API_TOKEN }}
#
# - name: Run tests & build javadoc - name: Run build javadoc, verify (test)
# run: mvn clean verify javadoc:javadoc -Dadditionalparam=-Xdoclint:none --batch-mode run: mvn verify javadoc:jar -Dadditionalparam=-Xdoclint:none -Drevision=${REVISION} --batch-mode
env:
REVISION: ${{ github.event.inputs.revision }}
- name: Deploy - name: Deploy
run: mvn clean deploy javadoc:javadoc javadoc:jar -Dadditionalparam=-Xdoclint:none -Ppublish -DskipTests -Drevision=${REVISION} -B --batch-mode run: mvn deploy -Ppublish -DskipTests -DskipJavadoc -Drevision=${REVISION} -B --batch-mode
env: env:
REVISION: ${{ github.event.inputs.revision }} REVISION: ${{ github.event.inputs.revision }}
MAVEN_USERNAME: ${{ secrets.CENTRAL_SONATYPE_TOKEN_USERNAME }} MAVEN_USERNAME: ${{ secrets.CENTRAL_SONATYPE_TOKEN_USERNAME }}
@@ -65,7 +75,11 @@ jobs:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Tag release - name: Tag release
run: | run: |
git tag -a ${REVISION} -m "Release version ${REVISION}" if [ "${REVISION}" != "0-SNAPSHOT" ]; then
git push origin ${REVISION} git config --global user.email "release_manager@hawkbit.eclipse.org"
git config --global user.name "Eclipse Hawkbit (Release Manager)"
git tag -a ${REVISION} -m "Release version ${REVISION}"
git push origin ${REVISION}
fi
env: env:
REVISION: ${{ github.event.inputs.revision }} REVISION: ${{ github.event.inputs.revision }}

View File

@@ -743,4 +743,4 @@
<module>hawkbit-test-report</module> <module>hawkbit-test-report</module>
</modules> </modules>
</project> </project>