Bump configuration-as-code.version from 1625.v27444588cc3d to 1700.v6f448841296e #325
Workflow file for this run
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: CI build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [11] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'zulu' | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/Hydrogen' | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: check Sonar pre-conditions | |
id: check_sonar | |
continue-on-error: true | |
env: | |
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} | |
SONAR_ORGANIZATION: ${{ secrets.SONARCLOUD_ORGANIZATION }} | |
run: test "${SONAR_ORGANIZATION}" -a "${SONAR_TOKEN}" | |
shell: bash | |
- name: Build with Sonar | |
id: build_sonar | |
if: matrix.java == '11' && steps.check_sonar.outcome == 'success' && !startsWith(github.head_ref, 'dependabot/') | |
env: | |
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} | |
SONAR_ORGANIZATION: ${{ secrets.SONARCLOUD_ORGANIZATION }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: mvn -B clean test verify package org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.projectKey=org.jenkins-ci.plugins:dependency-track -Dsonar.organization=$SONAR_ORGANIZATION -Dsonar.login=$SONAR_TOKEN | |
- name: Build without Sonar | |
if: steps.build_sonar.conclusion == 'skipped' | |
run: mvn -B clean test verify package | |
- uses: actions/upload-artifact@v3 | |
if: success() | |
with: | |
path: target/dependency-track.hpi | |
name: dependency-track.hpi |