If we create a branch in gitlab. pipeline will triggers that pipeline will run in master template. it is failing the pipeline showing the error branch not found(created). if we re run the same pipeline without any changes its passed with no eror

if we create a branch in gitlab. pipeline will triggers that pipeline will run in master template. it is failing the pipeline showing the error branch not found(created). if we re run the same pipeline without any changes its passed with no error. may i know th error…

script:
- cd $CI_PROJECT_DIR
- |
if [ -n “$CI_COMMIT_REF_NAME” ]; then
BRANCH_NAME=$CI_COMMIT_REF_NAME
elif [ -n “$CI_MERGE_REQUEST_TARGET_BRANCH_NAME” ]; then
BRANCH_NAME=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
fi

Hey there.

I’m really not sure what this script is doing in the context of the rest of your pipeline (and how it relates to SonarCloud analysis). What exactly is throwing the error (and what is the exact log message?)

image

Hi Colin, in the first image 2 sonar piplines swos one is red and another was green. 1st time its failed and received the error (in image2) again iam re run (by clicking retry) without any changes its show passed without any errors… this is the issue iam facing

image

in the above image sonarqube failed on but the status shows SUCESS

Hey there.

I now see you are using SonarQube rather than SonarCloud (so I’ve moved your post).

Can you confirm what version of SonarQube you are using?

SonarScanner 4.6.2.2472
SonarQube server 7.9.3

Thanks for the update. SonarQube v7.9 LTS is an EOL version of SonarQube. I invite you to upgrade to the minimum supported version of SonarQube (v8.9 LTS, which came out almost a year ago). If you still face the issue then, we’ll be happy to take another look.