-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c2e272
commit 70797ed
Showing
4 changed files
with
150 additions
and
78 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "Compound Java checks", | ||
"description": "Combine vulnerability, license, integration test checks", | ||
"iconName": "example-icon" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: Compound Java checks | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
runs-on: | ||
required: false | ||
type: string | ||
default: 'ubuntu-latest' | ||
app-version: | ||
required: false | ||
type: string | ||
default: '0.0.0' | ||
java-version: | ||
required: false | ||
type: string | ||
default: '11' | ||
java-vendor: | ||
required: false | ||
type: string | ||
default: 'zulu' | ||
scanner-enabled: | ||
required: false | ||
type: boolean | ||
default: true | ||
description: 'Whether vulnerabilities and license scanning are enabled' | ||
strict-scanner: | ||
required: false | ||
type: boolean | ||
default: true | ||
description: 'Whether vulnerabilities and license scanning executions are strict' | ||
multi-project: | ||
required: false | ||
type: boolean | ||
default: false | ||
description: 'false for dependencyCheckAnalyze, true for dependencyCheckAggregate' | ||
integration-test-enabled: | ||
required: false | ||
type: boolean | ||
default: false | ||
description: 'Whether integration test is enabled' | ||
integration-test-projects: | ||
required: false | ||
type: string | ||
default: "['.']" | ||
description: 'list of projects for running integration tests' | ||
integration-test-task: | ||
required: false | ||
type: string | ||
default: 'integrationTest' | ||
description: "Gradle task name to run integration test" | ||
secrets: | ||
nvd-api-key: | ||
required: false | ||
description: 'API key to access NVD database' | ||
outputs: | ||
status: | ||
description: "Aggregated status" | ||
value: | | ||
(inputs.strict-scanner && jobs.owasp-scan.result == 'success' || !inputs.strict-scanner) && | ||
(inputs.strict-scanner && jobs.license-check.result == 'success' || !inputs.strict-scanner) && | ||
(inputs.integration-test-enabled && jobs.integration-test == 'success' || !inputs.integration-test-enabled) | ||
jobs: | ||
owasp-scan: | ||
name: 'OWASP scan' | ||
if: inputs.scanner-enabled | ||
uses: th2-net/.github/.github/workflows/owasp-gradle-scan.yml@main | ||
with: | ||
multiproject: ${{ inputs.multi-project }} | ||
java-version: ${{ inputs.java-version }} | ||
java-vendor: ${{ inputs.java-vendor }} | ||
secrets: | ||
nvd-api-key: ${{ secrets.nvd-api-key }} | ||
|
||
license-check: | ||
name: 'License check' | ||
if: inputs.scanner-enabled | ||
uses: th2-net/.github/.github/workflows/license-check.yml@main | ||
with: | ||
version: ${{ inputs.app-version }} | ||
|
||
integration-test: | ||
name: 'Integration tests' | ||
if: inputs.integration-test-enabled | ||
strategy: | ||
matrix: | ||
integration-test-project: ${{ fromJson(inputs.integration-test-projects) }} | ||
uses: th2-net/.github/.github/workflows/java-integration-test.yml@integration-tests # FIXME: switch to main branch | ||
with: | ||
runs-on: ${{ inputs.runs-on }} | ||
java-version: ${{ inputs.java-version }} | ||
java-vendor: ${{ inputs.java-vendor }} | ||
projectPath: ${{ matrix.integration-test-project }} | ||
integrationTestTask: ${{ inputs.integration-test-task }} |
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
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