Unverified Commit 9e459adb authored by daz's avatar daz
Browse files

Add 'dependency-graph-report-dir' input parameter

parent 1371d49f
Loading
Loading
Loading
Loading
+4 −6
Changes for .github/workflows/integ-test-dependency-submission.yml: 4 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -279,9 +279,8 @@ jobs:
      uses: ./dependency-submission
      with:
        dependency-graph: generate-and-submit
        dependency-graph-report-dir: '${{ github.workspace }}/custom/report-dir'
        build-root-directory: .github/workflow-samples/groovy-dsl
      env: 
        DEPENDENCY_GRAPH_REPORT_DIR: '${{ github.workspace }}/custom/report-dir'
    - name: Check generated dependency graphs
      shell: bash
      run: |
@@ -310,9 +309,8 @@ jobs:
      uses: ./dependency-submission
      with:
        dependency-graph: generate-and-upload
        dependency-graph-report-dir: '${{ github.workspace }}/custom/report-dir'
        build-root-directory: .github/workflow-samples/groovy-dsl
      env: 
        DEPENDENCY_GRAPH_REPORT_DIR: '${{ github.workspace }}/custom/report-dir'

  custom-report-dir-download-and-submit:
    needs: custom-report-dir-upload
@@ -327,10 +325,10 @@ jobs:
      uses: ./dependency-submission
      with:
        dependency-graph: download-and-submit
        dependency-graph-report-dir: '${{ github.workspace }}/custom/report-dir'
        build-root-directory: .github/workflow-samples/groovy-dsl
      env: 
        DEPENDENCY_GRAPH_REPORT_DIR: '${{ github.workspace }}/custom/report-dir'
        DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: custom-report-dir-upload
        DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: custom-report-dir-upload # For testing, to avoid downloading artifacts from other worklfows

    - name: Check downloaded dependency graph
      shell: bash
+7
Changes for dependency-submission/action.yml: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -108,6 +108,13 @@ inputs:
    required: false
    default: 'generate-and-submit'

  dependency-graph-report-dir:
    description: |
      Specifies where the dependency graph report will be generated. 
      Paths can relative or absolute. Relative paths are resolved relative to the workspace directory.
    required: false
    default: 'dependency-graph-reports'

  dependency-graph-continue-on-failure:
    description: When 'false' a failure to generate or submit a dependency graph will fail the Step or Job. When 'true' a warning will be emitted but no failure will result.
    required: false
+7
Changes for docs/dependency-submission.md: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -102,6 +102,13 @@ In some cases, the default action configuration will not be sufficient, and addi

        # Do not attempt to submit the dependency-graph. Save it as a workflow artifact.
        dependency-graph: generate-and-upload

        # Specify the location where dependency graph files will be generated.
        dependency-graph-report-dir: custom-report-dir

        # By default, failure to generate a dependency graph will cause the workflow to fail
        dependency-graph-continue-on-failure: true

```

See the [Action Metadata file](../dependency-submission/action.yml) for a more detailed description of each input parameter.
+7
Changes for setup-gradle/action.yml: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -84,6 +84,13 @@ inputs:
    required: false
    default: 'disabled'

  dependency-graph-report-dir:
    description: |
      Specifies where the dependency graph report will be generated. 
      Paths can relative or absolute. Relative paths are resolved relative to the workspace directory.
    required: false
    default: 'dependency-graph-reports'

  dependency-graph-continue-on-failure:
    description: When 'false' a failure to generate or submit a dependency graph will fail the Step or Job. When 'true' a warning will be emitted but no failure will result.
    required: false
+2 −1
Changes for sources/src/configuration.ts: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -43,7 +43,8 @@ export class DependencyGraphConfig {
    }

    getReportDirectory(): string {
        return path.resolve(getWorkspaceDirectory(), 'dependency-graph-reports')
        const param = core.getInput('dependency-graph-report-dir')
        return path.resolve(getWorkspaceDirectory(), param)
    }

    getDownloadArtifactName(): string | undefined {