I`m running IBM UrbanCode Build with maven machine.
When I try to pass
sonar.branch.name=${p:triggeredBranch}
property to scanner to get
sonar.branch.name=develop
resulting branch name in SonarQube is
developsonar.sources=./
Adding \n or \r\n just adds space between and brings branch name of
develop sonar.sources=./
Properties are read and passed correctly by UrbanCode
Summary
properties:
PLUGIN_INPUT_PROPS=/opt/IBM/UCBuild/agent/var/temp/logs6411214801629919715/input.props
PLUGIN_OUTPUT_PROPS=/opt/IBM/UCBuild/agent/var/temp/logs6411214801629919715/output.props
agent/IBM UrbanCode Build/java.home=/opt/ibm/java-x86_64-80/
agent/system.default.encoding=UTF-8
automation=598aafaa-0038-49f7-989d-7b0f228ab4fb
automation/commandPath=/opt/sonar/bin/sonar-scanner
automation/sonarUrl=http://SonarQube_address_here:9000/
buildlife/artifactId=mailer
buildlife/codestation.repo.id=9b8c0ded-c6fb-4034-80ea-6d76921571ee
buildlife/groupId=ru.lanit.dvsbs
buildlife/triggeredBranch=develop
buildlife/version=1.0.0
buildlife/workspace.branch.3d527faa-e40a-4152-a466-9809b064acec=develop
buildlife/workspace.remoteBaseUrl.3d527faa-e40a-4152-a466-9809b064acec=https://gitlab.address.here/NSPS/mpp
buildlife/workspace.remoteUrl.3d527faa-e40a-4152-a466-9809b064acec=mpp
buildlife/workspace.revision.3d527faa-e40a-4152-a466-9809b064acec=154505c6863aadec4cdfdc261db84bee0ee2dfc5
excludes=
flags=-P sonar
goals=sonar:sonar
javaHome=/opt/ibm/java-x86_64-80
job/work.dir.path=/opt/IBM/UCBuild/agent/var/work/project/MPP/DEMO_mpp__Sonar_/develop
job/workspace.date=2020-06-11T03:16:23.864+0300
jvmProperties=
language=
localRepoMetaDir=
mavenHome=
mavenProps=
mavenVersion=2
pomFileName=pom.xml
projKey=id_31
projName=MPP
properties=sonar.branch.name=develop\r\n
request/git.project=mpp
request/triggeredBranch=develop
request/workflow.trace.id=3a01bdb1-8196-47e9-bb99-0a8dda0ed0a8
scriptContent=
srcDir=.
version=develop-113
But later something happens
Summary
Listing properties in the sonar-project.properties file
sonar.host.url=http://SonarQube_address_here:9000/
sonar.branch.name=develop\r\nsonar.sources=.
sonar.projectKey=id_31
sonar.projectName=MPP
sonar.projectVersion=develop-113
I`m run out of ideas. Does anybody can share some advice?