Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serve PR decoration images as static resources #80

Closed
don-vip opened this issue Jan 24, 2020 · 1 comment · Fixed by #81
Closed

Serve PR decoration images as static resources #80

don-vip opened this issue Jan 24, 2020 · 1 comment · Fixed by #81
Labels
bug Something isn't working

Comments

@don-vip
Copy link
Contributor

don-vip commented Jan 24, 2020

Describe the bug
In order to display the PR decoration icons in the notifications created by the plugin, it is currently necessary to either have Internet access to https://raw.githubusercontent.com/mc1arke/sonarqube-community-branch-plugin/master/src/main/resources/pr-decoration-images or to host the images on a private web server and configure the com.github.mc1arke.sonarqube.plugin.branch.image-url-base property.

Expected behavior
All of this should not be necessary. SonarQube allows plugin to serve static resources as follows:

If you need to serve static resources from your plugin such as images or JavaScript files, place them in a directory under resources named static (myplugin/src/main/resources/static). At runtime they'll be available from http://{server}/static/{pluginKey}/{file}.

Software Versions

  • SonarQube Version: 8.0
  • Plugin Version: 1.2.1-SNAPSHOT (current master)
@don-vip don-vip added the bug Something isn't working label Jan 24, 2020
don-vip added a commit to don-vip/sonarqube-community-branch-plugin that referenced this issue Jan 26, 2020
don-vip added a commit to don-vip/sonarqube-community-branch-plugin that referenced this issue Feb 2, 2020
Removes the com.github.mc1arke.sonarqube.plugin.branch.image-url-base property and use SonarQube static resources system instead.
mc1arke pushed a commit that referenced this issue Feb 17, 2020
Removes the com.github.mc1arke.sonarqube.plugin.branch.image-url-base property and use SonarQube static resources system instead.
mclayton7 pushed a commit to mclayton7/sonarqube-community-branch-plugin that referenced this issue Apr 12, 2020
Removes the com.github.mc1arke.sonarqube.plugin.branch.image-url-base property and use SonarQube static resources system instead.
@NehaOberoi92
Copy link

As per above request , we no longer need to download file from https://raw.githubusercontent.com/mc1arke/sonarqube-community-branch-plugin/master/src/main/resources/static for sonar which is not accessible from github.
Then what configuration si required for PR decoration, do I need to update Images base URL property in General > Pull Request settings ? If yes what needs to be updated in that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants