Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ runs:
with:
maven-version: ${{ inputs.maven-version }}

- name: Install @sap/cds-dk
run: npm i -g @sap/cds-dk@9.9.1
shell: bash

- name: Maven Build
run: mvn clean install -DskipTests -B -ntp
shell: bash
12 changes: 5 additions & 7 deletions .github/actions/scan-with-blackduck/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ inputs:
maven-version:
description: The Maven version the build shall run with.
required: true
version:
description: The project version to report to Black Duck (e.g. release tag).
required: true
Comment on lines +18 to +20
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The new version input is marked required: true, but the main.yml workflow's blackduck job calls this action without supplying version. This will cause the CI-MAIN workflow to fail after this PR merges.

The main.yml scan runs in RAPID mode (pre-merge/nightly) where no release tag exists, so a sensible fallback would be to either make version optional with a default (e.g. the branch name or commit SHA), or derive it inside the action when the input is absent.

Consider making version optional and providing a default, for example the git commit SHA, or add a fallback step inside the action:

  version:
    description: The project version to report to Black Duck (e.g. release tag).
    required: false
    default: ''

And then derive it inside the action when it is empty (e.g. via git rev-parse --short HEAD).


Please provide feedback on the review comment by checking the appropriate box:

  • 🌟 Awesome comment, a human might have missed that.
  • ✅ Helpful comment
  • 🤷 Neutral
  • ❌ This comment is not helpful

scan_mode:
description: The scan mode to use (FULL or RAPID)
default: 'FULL'
Expand All @@ -35,12 +38,6 @@ runs:
with:
maven-version: ${{ inputs.maven-version }}

- name: Get Revision
id: get-revision
run: |
echo "REVISION=$(mvn help:evaluate -Dexpression=revision -q -DforceStdout)" >> $GITHUB_OUTPUT
shell: bash

- name: BlackDuck Security Scan
uses: blackduck-inc/black-duck-security-scan@659a0742e793a093377fab3117b0d90f23b04bfa # v2.9.0
with:
Expand All @@ -50,7 +47,8 @@ runs:
github_token: ${{ inputs.github_token }}
detect_args: >
--detect.project.name=com.sap.cds.feature.attachments
--detect.project.version.name=${{ steps.get-revision.outputs.REVISION }}
--detect.project.version.name=${{ inputs.version }}
--detect.project.group.name=CDSJAVA-OPEN-SOURCE
--detect.included.detector.types=MAVEN
--detect.excluded.directories=**/*test*,**/samples/**
--detect.maven.included.modules=cds-feature-attachments,cds-feature-attachments-oss,cds-feature-attachments-fs
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
blackduck_token: ${{ secrets.BLACK_DUCK_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
maven-version: ${{ env.MAVEN_VERSION }}
version: ${{ github.event.release.tag_name }}

update-version:
needs: requires-approval
Expand Down
Loading