Hi all,
I'm trying to use the "sonarqube-scan" pipe:
https://bitbucket.org/sonarsource/sonarqube-scan
But to connect to our sonarqube server, we need to have certificates installed to make the connection to our server.
Is there a way to provide SSL certificates to be used in pipes?
Are there any other practices used to solve this issue?
Thanks in advance!
Jochen
Community moderators have prevented the ability to post new answers.
Hi Jochen,
I would use Workspace variables which you'll find in the Workspace settings of your organization (or repository settings -> repositoy variables if you want it scoped down). From the docs you can see how to add your SSL certificate and how it will be masked in the pipeline logs: Variables and secrets
From the https://bitbucket.org/sonarsource/sonarqube-scan the basic example shows:
- step: script: - pipe: sonarsource/sonarqube-scan:<pipe version> # Ex: v4.0.0, See the latest version at https://bitbucket.org/bitbucket/product/features/pipelines/integrations?category=codequality&p=sonarsource/sonarqube-scan variables: SONAR_HOST_URL: ${SONAR_HOST_URL} SONAR_TOKEN: ${SONAR_TOKEN}
And if you filled in the variables as SONAR_TOKEN it should be runable straight away.
I will note from the Bitbucket docs linked earlier that sometimes they differ on how you should access the variables, so you might need to experiment with the below options:
$SONAR_TOKEN
${SONAR_TOKEN}
${{SONAR_TOKEN}}
In my organizations pipelines we either use $SONAR_TOKEN for script and ${{SONAR_TOKEN}} for .yaml parts as per the docs, though I suspect that the sonarqube-scan documentation is also a valid syntax since they documented it with that.
Best regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.