fix: add corepack to docker image #53
Workflow file for this run
This file contains hidden or 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 Pull Request | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - '*.md' # Ignore only in root; we generally want to run build for `site/` changes | |
| - '**/README.md' # Ignore all READMEs | |
| - '.github/**/*.md' # Ignore github config | |
| permissions: {} | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| jdk_default_version: [ '25' ] # Single JDK version to run Maven with and use for compilation etc | |
| jdk_test_version: [ '11', '17', '21', '25' ] # JDK version to run surefire/failsafe tests using | |
| fail-fast: false | |
| name: Build and Test (JDK ${{ matrix.jdk_test_version }}${{ matrix.jdk_test_version == matrix.jdk_default_version && ' - Default' || '' }}) | |
| permissions: | |
| security-events: write | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Check ODC Data Cache | |
| id: odc-data-cache | |
| uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 | |
| with: | |
| path: core/target/data | |
| key: odc-data | |
| - uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Set up JDKs | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| java-version: | # last version takes precedence as default | |
| ${{ matrix.jdk_test_version }} | |
| ${{ matrix.jdk_default_version }} | |
| distribution: 'zulu' | |
| check-latest: true | |
| cache: 'maven' | |
| cache-dependency-path: '**/pom.xml' | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: 24 | |
| - run: npm install -g corepack && corepack enable | |
| - name: Build/Test with Maven | |
| id: build | |
| run: > | |
| mvn -V -s settings.xml -pl '!maven' -am | |
| clean verify | |
| -Dtoolchain.jdk.test.version=${{ matrix.jdk_test_version }} -Dtoolchain.jdk.test.home="$JAVA_HOME_${{ matrix.jdk_test_version }}_X64" | |
| ${{ matrix.jdk_test_version == matrix.jdk_default_version && 'source:jar javadoc:jar site' || '' }} | |
| --no-transfer-progress --batch-mode -Dstyle.color=always | |
| - name: SARIF Multitool | |
| uses: microsoft/sarif-actions@c8dd8ba66449523fe92a68cbe13aab3c271efe3c # v0.2 | |
| with: | |
| # Command to be sent to SARIF Multitool | |
| command: 'validate core/target/test-reports/Report.sarif' | |
| - name: Upload SARIF file | |
| uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1 | |
| with: | |
| sarif_file: utils/target/spotbugsSarif.json | |
| category: spotbugs-utils | |
| - name: Upload SARIF file | |
| uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1 | |
| with: | |
| sarif_file: cli/target/spotbugsSarif.json | |
| category: spotbugs-cli | |
| - name: Upload SARIF file | |
| uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1 | |
| with: | |
| sarif_file: ant/target/spotbugsSarif.json | |
| category: spotbugs-ant | |
| - name: Upload SARIF file | |
| uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1 | |
| with: | |
| sarif_file: core/target/spotbugsSarif.json | |
| category: spotbugs-core | |
| - name: Archive Snapshot | |
| if: matrix.jdk_test_version == matrix.jdk_default_version | |
| id: archive-snapshot | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: archive-snapshot | |
| retention-days: 1 | |
| path: | | |
| **/target/*.asc | |
| **/target/*.jar | |
| **/target/*.pom | |
| ant/target/*.zip | |
| cli/target/*.zip | |
| maven: | |
| strategy: | |
| matrix: | |
| jdk_default_version: [ '25' ] # Single JDK version to run Maven with and use for compilation etc | |
| jdk_test_version: [ '11', '17', '21', '25' ] # JDK version to run surefire/failsafe tests using | |
| fail-fast: false | |
| name: Regression Test Maven Plugin (JDK ${{ matrix.jdk_test_version }}${{ matrix.jdk_test_version == matrix.jdk_default_version && ' - Default' || '' }}) | |
| permissions: | |
| security-events: write | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Maven Integration Test Cache | |
| id: maven-it-cache | |
| uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 | |
| with: | |
| path: maven/target/local-repo | |
| key: mvn-it-repo | |
| - name: Check ODC Data Cache | |
| id: odc-data-cache | |
| uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 | |
| with: | |
| path: core/target/data | |
| key: odc-data | |
| - uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Set up JDKs | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| java-version: | # last version takes precedence as default | |
| ${{ matrix.jdk_test_version }} | |
| ${{ matrix.jdk_default_version }} | |
| distribution: 'zulu' | |
| check-latest: true | |
| cache: 'maven' | |
| cache-dependency-path: '**/pom.xml' | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: 24 | |
| - run: npm install -g corepack && corepack enable | |
| - name: Regression Test Maven Plugin | |
| id: build | |
| env: | |
| NVD_API_KEY: ${{ secrets.NVD_API_KEY }} | |
| run: > | |
| mvn -V -s settings.xml -pl maven -am | |
| clean verify -DskipTests=true -PFullIntegrationTesting | |
| -Dtoolchain.jdk.test.version=${{ matrix.jdk_test_version }} -Dtoolchain.jdk.test.home="$JAVA_HOME_${{ matrix.jdk_test_version }}_X64" | |
| --no-transfer-progress --batch-mode -Dstyle.color=always | |
| - name: Archive IT test logs | |
| id: archive-logs | |
| if: always() | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: it-test-logs-jdk-${{ matrix.jdk_test_version }} | |
| retention-days: 7 | |
| path: maven/target/it/**/build.log | |
| - name: Upload SARIF file | |
| uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1 | |
| with: | |
| sarif_file: maven/target/spotbugsSarif.json | |
| category: spotbugs-maven | |
| checkstyle: | |
| name: Checkstyle Validation | |
| permissions: | |
| security-events: write | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set up JDK | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| java-version: '25' | |
| distribution: 'zulu' | |
| check-latest: true | |
| cache: 'maven' | |
| cache-dependency-path: '**/pom.xml' | |
| - name: Checkstyle | |
| id: checkstyle | |
| run: | | |
| mvn -V -s settings.xml checkstyle:checkstyle-aggregate --no-transfer-progress --batch-mode -Dstyle.color=always | |
| - name: Upload SARIF file | |
| uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1 | |
| with: | |
| sarif_file: target/checkstyle-result.sarif | |
| category: checkstyle | |
| docker: | |
| permissions: | |
| contents: read # to fetch code (actions/checkout) | |
| name: Build and Test Docker | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set up JDK | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| java-version: '25' | |
| distribution: 'zulu' | |
| check-latest: true | |
| cache: 'maven' | |
| cache-dependency-path: '**/pom.xml' | |
| - name: Download release build | |
| uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 | |
| with: | |
| name: archive-snapshot | |
| - name: Set up Docker | |
| uses: docker/setup-docker-action@1a6edb0ba9ac496f6850236981f15d8f9a82254d # v5.0.0 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 | |
| - name: Build Docker Image | |
| run: ./docker-build.sh | |
| - name: build scan target | |
| run: > | |
| mvn -V -s settings.xml -pl cli -am | |
| package -DskipTests=true | |
| --no-transfer-progress --batch-mode -Dstyle.color=always | |
| - name: Test Docker Image | |
| run: ./docker-test.sh |