-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,8 @@ COPY sonar-runner.properties /usr/lib/sonar-scanner/conf/sonar-scanner.propertie | |
# ensure Sonar uses the provided Java for musl instead of a borked glibc one | ||
RUN sed -i 's/use_embedded_jre=true/use_embedded_jre=false/g' /usr/lib/sonar-scanner/bin/sonar-scanner | ||
|
||
# Use bash if you want to run the environment from inside the shell, otherwise use the command that actually runs the underlying stuff | ||
#CMD /bin/bash | ||
CMD sonar-scanner -Dsonar.projectBaseDir=/usr/src | ||
# Separating ENTRYPOINT and CMD operations allows for core execution variables to | ||
# be easily overridden by passing them in as part of the `docker run` command. | ||
# This allows the default /usr/src base dir to be overridden by users as-needed. | ||
ENTRYPOINT ["sonar-scanner"] | ||
CMD ["-Dsonar.projectBaseDir=/usr/src"] | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
newtmitch
Author
Owner
|
7 comments
on commit 71cce66
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you make changes please do not change the other versions, now I have an error and I will have to use another image sonar-scanner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I totally agree with @jupytercl.
Your new change on older versions forces us to modify our pipelines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, making breaking changes into existing images... not cool 👎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added:
args "--entrypoint=\'\'"
to my jenkinsfile to get it to work.
Got it from :
https://issues.jenkins-ci.org/browse/JENKINS-51307?jql=text%20~%20%22pipeline%20scm%22
Hope this helps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, since the update we're getting:
ERROR: Unrecognized option: -c
while we're using:
syntax-sonar:
stage: syntax
image: newtmitch/sonar-scanner
script:
- sonar-scanner -Dsonar.host.url=https://oursite.nl/sonarqube -Dsonar.login=xxx -Dsonar.sources=. -Dsonar.exclusions=*/node_modules/** -Dsonar.projectName=ourproject -Dsonar.projectBaseDir=xxx -Dsonar.projectKey=pro:ject
Could you explain what we need to change to solve the error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added:
args "--entrypoint=\'\'"
to my jenkinsfile to get it to work.
Got it from :
https://issues.jenkins-ci.org/browse/JENKINS-51307?jql=text%20~%20%22pipeline%20scm%22Hope this helps.
That's what we did to fix our Jenkins builds. We also used mappings to the /root/src
directory which had to be changed to the new default /usr/src
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing some cleanup and maintenance of the repo. Sorry about this breaking change, I completely didn't think about this hard enough before I did it, nor understood the impact to the community making use of it. My sincere apologies. I realize also this wasn't a good change to make, and instead I should have responded to the issue that was reporting the problem that prompted me to make this change by suggesting a different approach.
I'm getting ready to add new Dockerfiles for Sonar Scanner versions 4.1 - 4.5 that will move back to the single CMD
-based approach rather than the ENTRYPOINT
approach I introduced with this change. I'll be leaving the existing images alone given the changes everyone had to make to accommodate this change I made. I'll also be adding a version 4.0 dockerfile alongside the existing 4.0 dockerfile with the CMD
approach and labeling it specifically for CI, as suggested in #30.
👎
Changing behavior of existing docker image version (3.0.3-alpine). Not cool. This breaks my pipelines.