Build Documentation & QA #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Build Documentation & QA' | |
on: | |
workflow_run: | |
workflows: ["master_build"] | |
branches: [ master ] | |
types: | |
- completed | |
env: | |
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn | |
jobs: | |
build_site: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
name: Build Microservice Docs | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 21 | |
- name: Cache SonarQube packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Maven packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Install tools | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "CI Server" | |
- name: Site | |
run: > | |
./mvnw post-integration-test site scm-publish:publish-scm | |
-DsurefireArgs=-Dspring.profiles.active=TEST | |
-Dargs=-Dspring.profiles.active=TEST | |
-Dscmpublish.pubScmUrl=scm:git:https://openwms:[email protected]/spring-labs/org.openwms.gateway.git | |
-DdeveloperConnectionUrl=scm:git:https://openwms:[email protected]/spring-labs/org.openwms.gateway.lib.git | |
-Dci.buildNumber=$GITHUB_RUN_NUMBER | |
-Prelease,coverage -B $MAVEN_OPTS | |
env: | |
PUSHKEY: ${{ secrets.GITHUB_TOKEN }} | |
- name: Sonar | |
run: > | |
./mvnw verify org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar | |
-DsurefireArgs="-Dspring.profiles.active=ASYNCHRONOUS,TEST" | |
-Dspring.rabbitmq.host=localhost | |
-Dsonar.login=$SONAR_TOKEN | |
-DSONAR_TOKEN=$SONAR_TOKEN | |
-Dci.buildNumber=$GITHUB_RUN_NUMBER | |
-Pcoverage -B $MAVEN_OPTS | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |