synopsys-sig / polaris-ado

Polaris for Azure DevOps.
1 stars 2 forks source link

Error: The process '/usr/bin/git' failed with exit code 128 #10

Open nekosaur opened 3 years ago

nekosaur commented 3 years ago

When I try to use this task in an azure yaml pipeline, I get the following output

Starting: SynopsysPolaris
==============================================================================
Task         : Polaris Software Integrity Platform
Description  : The Azure Dev Ops plugin for Polaris Software Integrity Platform.
Version      : 1.2.0
Author       : Synopsys
Help         : 
==============================================================================
info: Polaris Software Integrity Platform task started.
debug: Read task configuration: https://*** @ ***
info: Polaris Software Integrity Platform will be installed to the following path: /opt/hostedtoolcache
info: Connecting to Polaris Software Integrity Platform server.
info: Authenticating with Polaris Software Integrity Platform.
info: Succesfully authenticated, saving bearer token.
debug: Authenticated with polaris.
debug: Fetching organization name and task version.
debug: Starting phone home.
debug: Phoned home.
debug: Populating change set for Polaris Software Integrity Platform.
##[error]An unexpected error occured:Error: The process '/usr/bin/git' failed with exit code 128
Finishing: SynopsysPolaris

I am using the following pipeline

trigger: none

pool:
  vmImage: 'Ubuntu-latest'

steps:
- checkout: self
  persistCredentials: true

- task: SynopsysPolaris@1
  inputs:
    polarisService: '***'
    polarisCommand: '--co project.name="***" analyze -w --incremental $CHANGE_SET_FILE_PATH'
    waitForIssues: false
    populateChangeSetFile: true
    whenChangeSetEmpty: succeed

The documentation here https://github.com/synopsys-sig/polaris-ado/blob/master/docs/docs.md does not explicitly say how to enable OAuth token when using yaml pipeline, only that The OAuth token can also be provided through the Azure variable "System.AccessToken". From googling I have understood that the persistCredentials: true setting should do just that. However I am still getting an error.

If I disable populateChangeSetFile then I do not get the error.

JeppeButhler commented 1 year ago

Just encountered the same issue with version 1.2.4 of the Azure DevOps plugin on a Windows vmImage. I was also able to "solve" the issue by setting the popylateChangeSetFile property to false.

// Jeppe, Visma mySupply

Y-Sari commented 8 months ago

Hi, we have the same issue in version 1.3.1.

We want to use the Incremental Analysis (LCA) feature from Polaris that is described here: https://sig-product-docs.synopsys.com/bundle/ci-integrations/page/topics/c_pol_ado_incr_analysis.html

Error from our Azure DevOps YAML pipeline:

Starting: Analysis | Coverity analysis
==============================================================================
Task         : Coverity on Polaris
Description  : The Azure Dev Ops plugin for Coverity on Polaris.
Version      : 1.3.1
Author       : Synopsys
Help         : 
==============================================================================
info: Polaris Software Integrity Platform task started.
debug: Read task configuration: https://carlzeiss.polaris.synopsys.com/ @ ***
info: Polaris Software Integrity Platform will be installed to the following path: /opt/hostedtoolcache
info: Connecting to Polaris Software Integrity Platform server.
info: Authenticating with Polaris Software Integrity Platform.
info: Succesfully authenticated, saving bearer token.
debug: Authenticated with polaris.
debug: Fetching organization name and task version.
debug: Starting phone home.
debug: Phoned home.
debug: Populating change set for Polaris Software Integrity Platform.
##[error]An unexpected error occured:Error: The process '/usr/bin/git' failed with exit code 128
Finishing: Analysis | Coverity analysis

This is the task in the YAML Pipeline that we use:

  - task: SynopsysPolaris@1
    env:
      # https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#systemaccesstoken
      SYSTEM_ACCESSTOKEN: $(System.AccessToken) 
    displayName: "Analysis | Coverity analysis"
    inputs:
      polarisService: '${{ parameters.ServiceConnectionName }}'
      populateChangeSetFile: true
      polarisCommand: >-
        --persist-config
        --co analyze.coverity.caching.jars=disable
        --co analyze.coverity.caching.pfi=disable
        --co analyze.coverity.caching.rws=disable
        --co analyze.coverity.caching.tu-caching=disable
        analyze
        --wait
        --incremental $CHANGE_SET_FILE_PATH
        --upload-local-config
        --run-property product=${{ parameters.Product }}
        --run-property language=${{ parameters.ProgrammingLanguage }}

What is causing this error? How can we fix it?

Best regards

mbujotzek commented 8 months ago

Hi, we have the same issue that @Y-Sari describes. Is there a solution for this?

Christian-Steusloff commented 8 months ago

@nekosaur have you found a solution for yourself? Unfortunately, I have the same problem...

nekosaur commented 7 months ago

No, I am no longer working on the project