sonatype / actions

Public repository to keep Sonatype's GitHub Actions.
Other
6 stars 1 forks source link

run-iq-cli ignores environment variables #4

Open svc-seaq-spu opened 1 week ago

svc-seaq-spu commented 1 week ago

I am trying to use your action sonatype/actions/run-iq-cli as follows:

- uses: sonatype/actions/setup-iq-cli@v1
  with:
    iq-cli-version: 'latest'
- uses: actions/setup-java@v4
  with:
    distribution: 'temurin'
    java-version: '17'
- uses: sonatype/actions/run-iq-cli@v1
  with:
    iq-server-url: "https://internal-iq-server"
    ...
  env:
    JAVA_TOOL_OPTIONS: "-Djavax.net.ssl.trustStore=/var/lib/ca-certificates/java-cacerts"

I am getting the following error:

Error:  The IQ Server https://internal-iq-server/api/v2/applications could not be contacted: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Your action sonatype/actions/run-iq-cli should have an optional input for java command-line options or it should pick up the environment variable JAVA_TOOL_OPTIONS.

norbertbaliga commented 6 days ago

That would be a resolution for my issue too that opened recently: https://github.com/sonatype/actions/issues/3