Picture an innocent and happy DevOps engineer trying to create a RedHat UBI Docker image that includes the SonarScanner Cli in it so that his team can execute automated containerized pipelines with automated SonarQube scans in GitLab on some code base that isn’t compiled with a common compiler like Maven or Gradle. “Simple!” thinks the DevOps engineer. “I’ll just download the Linux binary from SonarQube’s website, put it on a server internally, add curl and unzip commands to the Dockerfile, and add the binary to the path as an ENV!” But little did the DevOps engineer know of the hard road ahead, for when he tried to build the image, it failed. “This cannot be, the commands look correct!” Thought the DevOps engineer. After hours of debugging and toil, he stumbled upon the issue. The name of the zip file was “sonar-scanner-cli-6.2.1.4610-linux-x64.zip” but the folder within was named “sonar-scanner-6.2.1.4610-linux-x64” and they don’t match! “EGAD!” exclaimed the DevOps Engineer aloud. “This is clearly the source of my problem. But what evil is this, making a zip file with a containing folder within having a different name? Surely nobody is intentionally this evil! I must sound the alarm!” And thus, the DevOps engineer came to this forum to warn those who make the zip file of the pitfall and torment the DevOps engineer just underwent, as he didn’t have access to create a Jira issue but still wanted to make the world a slightly better place.
… “And they lived happily ever after” \o/
i like the tale you told … as if i would have done smth like that myself
On a more serious note … thank you for making the effort to type here!
And even more serious : Dear sonarqubists, is there a compelling reason for the mismatch or might this be something fixable? (quoting)
-
name of the zip file was “sonar-scanner
-cli
-6.2.1.4610-linux-x64.zip” -
but the folder within was named “sonar-scanner-6.2.1.4610-linux-x64” and they don’t match!
(i cursory checked the linux and windows versions of the zip, both omit the “-cli” in the folder name)
Hey there!
In March 2017 when the artifact was renamed sonar-scanner-cli-<version>.zip
, I suppose we didn’t update the baseDirectory
when we assemble the artifacts.
This is, at least, consistent, across all our distributions.
It would be an easy fix, but we’d have to consider what else might break (scripts that take a version and handle the rest), and whether or not that’s worth it. This is probably the first report we’ve had in 8 years!
I see, clearly this is a decision that has to be determined carefully. (this sentence contains 95% seriousness )