-
Notifications
You must be signed in to change notification settings - Fork 57
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
Add option to bundle jQuery and bootstrap #95
Comments
@kanduvisla: what do you think about assets definition in .phpqa.yml? report:
assets:
# default url -> absolute link <script>...
bootstrap.js: https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
# local asset would be copied to `--buildDir` -> relative link in <script>...
jquery.min.js: local-assets/jquery.min.js
# possible shortcut - load assets from directory
assets: local-assets/ |
Perhaps it would be nicer to have a boolean flag that downloads it from the CDN during build. In that case you don't need to 'pollute' your repository with assets that are not directly project-related. For example: report:
assets:
# false: templates will have links to CDN (default)
# true: assets will be downloaded and bundled with build
bundle_with_report: true |
Ok. At first, I thought that downloading assets during build might be a problem. |
No, the problem is that the build server (Jenkins in this case) does not allow loading external assets to prevent XSS. If the assets are bundled with the build/reports, it should not be a problem. |
Our build server (Jenkins) has the security policy that it does not allow loading external resources in it's reports. This means that the jQuery and bootstrap JavaScript and CSS files in the template are blocked, rendering the report broken.
Would it be an idea to add a configuration flag that bundles these assets in the reports so that there are no external dependencies required?
The text was updated successfully, but these errors were encountered: