Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Sonar build wrapper throws error

Gokulakrishnan R
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 29, 2024

Hello Team,

I am integrating Sonarcloud using Bitbucket pipeline to perform  C++ Linux based code analysis.

build gets failed or throws error, please find the below failed job

Build Failed:

export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH cd 5g-cpe/L3 source .settings_file build-wrapper-linux-x86-64 --out-dir bw-output make clean all <1s + export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH cd 5g-cpe/L3 source .settings_file build-wrapper-linux-x86-64 --out-dir bw-output make clean all bash: export: `5g-cpe/L3': not a valid identifier bash: export: `.settings_file': not a valid identifier bash: export: `build-wrapper-linux-x86-64': not a valid identifier bash: export: `--out-dir': not a valid identifier bash: export: `bw-output': not a valid identifier

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 2, 2024

Hi @Gokulakrishnan R and welcome to the community!

Based on the output you posted here, it looks like you have included multiple commands in a single line in your bitbucket-pipelines.yml file's script. I don't know how exactly that looks on your yml file and what syntax you have used.

Can you try editing the yml file and having each command on a separate line, as follows?

script:
- export <the rest of the command>
- cd <the rest of the command>
- <third command>

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events