Hi,
This is the latest build of the job I am trying to figure out.
After succesfully integrating my opensource Github C++ repo with travis-ci project and build it successfully, I am trying to add SonarCloud support without success.
I am using dist: focal. (Ubuntu 20.04)
I have added the sonarcloud addon to .travis.yml and it gets installed as I can see on the logs.
addons:
sonarcloud:
organization: “kiiglobal”
token:
secure: “xxxxxxxxxxxx”
However, when I try to execute the build-wrapper-linux-x86-64 or cloud-scanner I can’t find them under /home/travis/.sonar
Additionally, I tried to invoke java binary which I know is installed and it does not find it either. I know it is installed because I tried to install at install: tine inside build.yml
install:
- apt-get -y install openjdk-11-jdk
and it apparently is already installed.
On the logs, I see the addon is installed, but, when I try to invoke the sonar-cloud and build-wrapper-linux-x86-64
Please see log at the end.
According to log, I should be able to find sonar-scanner at $SONAR_SCANNER_HOME/bin/sonar-scanner but the file is not found.
Also, the build-wrapper-linux-x86-64 does ot indicate where it is installed nor I can find it.
I have tried to do find ./ -name build-wrapper-linux-x86-64 or sonar-scanner but files are not found.
I have tried to even download both zips inside the /home/travis/build (which is owned by the same logged in user but after succesffully unzipping, files does not exist either.
Any help is greatly appreciated as I have been googling and dong more tahn 30 jobs to try this and it simply, does not work.
Excerpt of the job log:
SonarCloud addon
addon hash: 718bd39b7176569c0003e2a917d7caf9
Preparing SonarQube Scanner CLI
Archive: /home/travis/.sonarscanner/sonar-scanner.zip
creating: /home/travis/.sonarscanner/sonar-scanner-4.7.0.2747/
creating: /home/travis/.sonarscanner/sonar-scanner-4.7.0.2747/bin/
creating: /home/travis/.sonarscanner/sonar-scanner-4.7.0.2747/conf/
creating: /home/travis/.sonarscanner/sonar-scanner-4.7.0.2747/lib/
inflating: /home/travis/.sonarscanner/sonar-scanner-4.7.0.2747/bin/sonar-scanner.bat
inflating: /home/travis/.sonarscanner/sonar-scanner-4.7.0.2747/bin/sonar-scanner-debug.bat
inflating: /home/travis/.sonarscanner/sonar-scanner-4.7.0.2747/bin/sonar-scanner-debug
inflating: /home/travis/.sonarscanner/sonar-scanner-4.7.0.2747/bin/sonar-scanner
inflating: /home/travis/.sonarscanner/sonar-scanner-4.7.0.2747/conf/sonar-scanner.properties
inflating: /home/travis/.sonarscanner/sonar-scanner-4.7.0.2747/lib/sonar-scanner-cli-4.7.0.2747.jar
$ mv ${TRAVIS_HOME}/.sonarscanner/sonar-scanner-* ${TRAVIS_HOME}/.sonarscanner/sonar-scanner
$ export SONAR_SCANNER_HOME=${TRAVIS_HOME}/.sonarscanner/sonar-scanner
Preparing build wrapper for SonarSource C/C++ plugin
Archive: /home/travis/.sonar/cache/68c2043a62ca2b20bde18ecdbbed3a39/build-wrapper-linux-x86.zip
creating: /home/travis/.sonar/cache/68c2043a62ca2b20bde18ecdbbed3a39/build-wrapper-linux-x86/
inflating: /home/travis/.sonar/cache/68c2043a62ca2b20bde18ecdbbed3a39/build-wrapper-linux-x86/libinterceptor-haswell.so
inflating: /home/travis/.sonar/cache/68c2043a62ca2b20bde18ecdbbed3a39/build-wrapper-linux-x86/build-wrapper-linux-x86-64
inflating: /home/travis/.sonar/cache/68c2043a62ca2b20bde18ecdbbed3a39/build-wrapper-linux-x86/libinterceptor-x86_64.so
inflating: /home/travis/.sonar/cache/68c2043a62ca2b20bde18ecdbbed3a39/build-wrapper-linux-x86/libinterceptor-i686.so
Preparing SonarQube Scanner parameters
before_script.1
0.05s$ python3 -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
before_script.2
0.00s
Thanks in advance.