Add metrics for tracking blacklist rules usage #1936
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: Java CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 1.11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.11 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Log into registry | |
if: ${{ !contains(github.ref, 'dependabot') }} | |
run: echo "${{ secrets.CC_VIS_DOCKER_HUB_SECRET }}" | docker login --username ccvisibility --password-stdin | |
- name: Build with Gradle | |
run: ./gradlew build --info --stacktrace | |
- name: Publish Failure Test Report | |
if: ${{ failure() }} # doesn't run unless it specifically grabs the failure condition of the previous step.. | |
uses: scacap/action-surefire-report@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
report_paths: '**/build/test-results/test/TEST-*.xml' | |
- name: Extract project version | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
run: echo "::set-env name=GRADLE_PROJECT_VERSION::`./gradlew properties|grep version |cut -c 10-`" | |
- name: Show project version | |
run: echo "$GRADLE_PROJECT_VERSION" | |
- name: Publish Docker container | |
if: ${{ !contains(github.ref, 'dependabot') }} | |
# run: ./gradlew -PdockerRepo=docker.pkg.github.com/${{ github.repository }}/ -x test publish --info | |
run: ./gradlew -PdockerRepo=ccvisibility/ -x test publish --info | |
# - name: scan docker image | |
# if: ${{ !contains(github.ref, 'dependabot') }} | |
# uses: azure/container-scan@v0 | |
# with: | |
# image-name: ccvisibility/carbonj:${{ env.GRADLE_PROJECT_VERSION }} | |
# severity-threshold: CRITICAL | |
# run-quality-checks: false | |