When we try to run Sonar Scanner to send quality analysis reports to SonarCloud, we receive a random “Received
killed signal” halfway through the sonar-scanner command, killing the build.
I do not receive the same error when SSHing into the build container and running the same command by hand.
Our base image is actually Lambda https://github.com/lambci/docker-lambda since we’re building a Lambda app, however, it works through Docker on our machines and it works when manually running the command via SSH. I have tried increasing the heap size and fiddling around with other memory options (as specified in similar bug reports) to no avail.
This is the relevant section of our config.yml:
- run: name: Run Sonarqube Code Quality Analysis and Dump Coverage/Execution Reports There # for some reason the npm install of sonar-scanner doesn't work command: | # @todo: cache this? use curl rather than installing wget? export MAVEN_OPTS="-Xms256m -Xmx1024m" export SONAR_RUNNER_OPTS="-Xms256m -Xmx1024m" export SONAR_VER=126.96.36.1998-linux wget https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_VER.zip unzip sonar-scanner-cli-$SONAR_VER.zip; mv sonar-scanner-$SONAR_VER/ /root/; /root/sonar-scanner-$SONAR_VER/bin/sonar-scanner -Dsonar.login=$SONAR_LOGIN -X;
Any ideas on how to fix this?