Skip to content

#67: Fix CVE-2023-42503 in org.apache.commons:commons-compress #164

#67: Fix CVE-2023-42503 in org.apache.commons:commons-compress

#67: Fix CVE-2023-42503 in org.apache.commons:commons-compress #164

Workflow file for this run

name: CI Build
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
environment: aws
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 11
cache: "maven"
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Install terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.5.1
- name: Enable testcontainer reuse
run: echo 'testcontainers.reuse.enable=true' > "$HOME/.testcontainers.properties"
- name: Create AWS test setup
run: |
echo "owner = \"$OWNER\"" > cloudSetup/terraform.tfvars
echo "deputy = \"$DEPUTY\"" >> cloudSetup/terraform.tfvars
terraform -chdir=cloudSetup/ init
terraform -chdir=cloudSetup/ apply -auto-approve
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
OWNER: ${{ secrets.AWS_TAG_OWNER }}
DEPUTY: ${{ secrets.AWS_TAG_DEPUTY }}
- name: Run tests and build with Maven
run: |
mvn --batch-mode clean verify \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-DtrimStackTrace=false
- name: Publish Test Report
uses: scacap/action-surefire-report@v1
if: ${{ always() && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Sonar analysis
if: ${{ env.SONAR_TOKEN != null }}
run: |
mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-DtrimStackTrace=false \
-Dsonar.organization=exasol \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=$SONAR_TOKEN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Destroy cluster
run: terraform -chdir=cloudSetup/ destroy -auto-approve
if: always() # also run if tests failed
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}