fossa-cli icon indicating copy to clipboard operation
fossa-cli copied to clipboard

Support for custom properties passed to the action

Open cmboling opened this issue 3 years ago • 3 comments

Include a field to add custom properties to FOSSA analysis. Some users are dealing with custom builds which require custom properties to be passed to the invocation.

@nielsdoucet provided a use case where a custom gradle wrapper is used where custom system properties are passed (e.g. ./gradlew -Dany.system.prop=value)

jobs:
  fossa-scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: fossas/fossa-action@main # Use a specific version if locking is preferred
        with:
          api-key: ${{secrets.fossaApiKey}}
          - gradle:
            - system-properties:
              sys.prop1: value1
              sys.prop2: value2
            - properties:
              prop1: value1
              prop2: value2

cmboling avatar Apr 05 '22 19:04 cmboling

For extra context: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_system_properties The relevant properties to define credentials to download a custom distribution are:

systemProp.gradle.wrapperUser=myuser systemProp.gradle.wrapperPassword=mypassword

NielsDoucet avatar Apr 06 '22 07:04 NielsDoucet

I did some further digging into the issue and I'm now convinced this can't be solved exclusively at the GitHub action level. This requires the fossa cli tool to adapt how it invokes gradle. This issue should probably be moved to the fossa-cli tool repository.

NielsDoucet avatar Aug 01 '22 13:08 NielsDoucet

@NielsDoucet Done.

cmboling avatar Aug 01 '22 23:08 cmboling