Jenkins show blank html instead of report - html

I use Jenkins 1.656 and HTML publisher plugin 1.11.
I have successfully added HTML report section in the job:
Jenkins project configuration
Unfortunately when I click on HTML Reports, it shows only blank page.
The zip button works -- it downloads the report archive.
I will appreciate any help

The issue was with nginx server, it was
add_header X-Frame-Options DENY;
changed to
add_header X-Frame-Options SAMEORIGIN;

I faced the same issue but when I executed the command below in the script console it worked. Please try:
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP"," ")

perhaps you have some JS in your report? Read this page: https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy and try to relax the security rules by changing JAVA_OPTS in tomcat.conf, then restart tomcat and clear broveser cache
I just saw your comment, try empty parameter:
-Dhudson.model.DirectoryBrowserSupport.CSP=

Try by adding one more Build step in configuration with below command:
npm install newman-reporter-html -g

For me above didn't work.
I publish report from IBM RPT (multiple .js files and index.html).
Jenki: reads index.html, first 2 .js files, but then it cracks on the others (searching them on the wrong path.
when downloaded in zip it works fine.
thx

Related

Trouble installing PHP Code Sniffer

I'm attempting to install PHP Code Sniffer for PhpStorm, but have been unable to get it to work. I've been following the steps here: https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Sniffer+in+PhpStorm
I added PHP Code Sniffer as a Composer dependency, and it now appears in the project directory. I then went to the code sniffer settings page, where I entered the path to the PHPCS.bat file. When I click Validate, I get an error message saying "Can not run PHP Code Sniffer".
Have I missed a step or is there a log somewhere with more information on what is not working?
I solved the same problem by editing the phpcs.bat file and replacing the paths:
PHPBIN=#php_bin#
with
PHPBIN=path\to\php.exe
and
"%PHPBIN%" "#bin_dir#\phpcs" %*
with
"%PHPBIN%" "path\to\phpcs" %*
I had the same issue, I solve it adding the php path to the PATH environment variables on windows. Because when it runs the scripts needs to run php and if it not present on the global path of windows will fail.

MediaWiki 1.29.0 maintenance/update.php does nothing

On my hosting with my MW (1.28.2) and SMW (2.5.3) a have:
/home/www/mediawiki-1.28.2
/home/www/w -> mediawiki-1.28.2 (link to mediawiki-1.28.2)
/home/www/.htaccess
Following https://www.mediawiki.org/wiki/Manual:Upgrading#Command_line I do:
Downloading mediawiki-1.29.0.tar.gz to /home/www/mediawiki-1.29.0.tar.gz
Unpack mediawiki-1.29.0.tar.gz to /home/www/mediawiki-1.29.0
Copy from /home/www/w to /home/www/mediawiki-1.29.0 files and folders: LocalSettings.php, images, some extensions
Then from command-line I do:
Change link /home/www/w from /home/www/mediawiki-1.28.2 to /home/www/mediawiki-1.29.0
cd /home/www/w
/opt/php/7.1/bin/php ~/bin/composer.phar require mediawiki/semantic-media-wiki "~2.5" --update-no-dev
/opt/php/7.1/bin/php ~/bin/composer.phar update
/opt/php/7.1/bin/php maintenance/update.php
And maintenance/update.php does nothing! At all!
And my site down to HTTP 500.
What is wrong and how can I debug maintenance/update.php ?
Okay, there is how I try to solve it:
I removed (temporary) .htaccess
I switched on error reporting in LocalSettings.php
When I went to my website/w/index.php I found that there were two(!) missing extensions: PdfHandler and SpamBlacklist. After removing them from LocalSettings.php all works fine.
That is the question: where were PdfHandler and SpamBlacklist gone???
https://www.mediawiki.org/wiki/Manual:How_to_debug
My guess (just a guess) is that there might be a problem with PHP7 as your default, since some MediaWiki extensions don't support it yet.
I think there was some problem with your dependencies try running "composer update" in the terminal and According to me it actually runs Localsettings.php file and aborts if it identifies any errors in the file so you have to check if there is any mistake in it and finally run php maintanence/update.php in mediawiki directory

link to .exe gives 'You do not have permission to access this document' instead of downloading it

When trying to add a link to a downloadable .exe I encounter an error/notice:
'You do not have permission to access this document' instead of downloading it.
This is the anchor:
Here
Using this on .zip and .dmg work fine.
I've found something eslewere, suggestion to add exe|EXE and place this in the .htaccess:
Deny from all
<FilesMatch "\.(html|HTML|htm|HTM|xhtml|XHTML|js|JS|css|CSS|bmp|BMP|png|PNG|gif|GIF|jpg|JPG|jpeg|JPEG|ico|ICO|doc|DOC|docx|DOCX|txt|TXT|rtf|RTF|xls|XLS|xlsx|XLSX|csv|CSV|zip|ZIP|pdf|PDF|exe|EXE)$">
Allow from all
</FilesMatch>
This did not solve my problem, removing for example the PDF from this bit of code, did block the pdf download. But the other way around, adding the exe didn't enable the exe to be downloadable.
It is a WordPress install, but these downloads are not uploaded via WordPress, they are directly placed in the downloads folder.
Kind regards,
Martijn
After more searching, I found someone, posting a simular problem.
The suggested answer (settings with the hosting, not the actual code) there was not the solution.
But did set us on the right path.
Previously simular code was working, but on another server, with a different config.Current domain is done via the Plesk panel.
In the Plesk panel, under the Apache & nginx settings for the domain.
Checking the box: 'Serve static files directly by nginx' solved the issue for me.

Parsed Console Output Error in Hudson

im running Hudson continuous integration for db unit.
when i run the job the console output is displaying the SUCCESS, but then why do the Parsed Console Output keep returning this error:
ERROR:Failed to parse console log :
log-parser plugin ERROR: Cannot parse log: Can't read parsing rules file:
i already installed the parse-log plugin & i already restarted the Hudson..
i installed the plugin using remote PC
any help and suggestion is appreciated. Thanks!
1) Place the Parser Rule File in the JENKINS_HOME location.
2) Configure that log parser console output in the Global COnfiguration settings and Name it.
3) Add this option in the Post Build Actions and Select the Name
ok silly me..
i forgot to configure the global configuration in hudson that link to the parser rule file..
problem solved.
I'm posting this in case anyone else has a specific case of this problem. This issue started when upgrading from 1.509.2 to 1.554.3... I had the parsing rules file in the win\system folder which was a known issue when running Jenkins as a service. Well I guess they fixed it by this version. I moved the parsing rules back into Jenkins Home folder and it worked fine again.

Unable to get email-ext.hpi to work in hudson

I have just setup hudson and have begun playing around with it.
I have downloaded the email-ext.hpi into the the folder $HUDSON_HOME\plugins
I have restarted hudson post-step1 ( i am following this manual method as i am unable to use (for proxy setting reasons) the automatic way of installing plugins via the "Manage hudson" page.
I dont see any errors when hudson starts. In fact i see the line
INFO: Started all plugins
BUT:
When i start a project configuration page, I do not see the promised option "Editable Email Notification".
FYI:
1. I am able to setup and run few basic test builds and they run fine.
2. I am also able to configure and receive the default hudson emails for failures and subsequent successes.(This confirms the SMTP settings)
3. I was also aboe to setup the subversion tag hpi in the same way as detailed above and that works fine as well!
What am i missing? Thanks in advance for any help!
EXTRA INFO:
Hudson version - 1.379 running on Windows XP
OK - i figured out a workaround (although i still need to dig into why this is a problem). Recording here for anyone else tha tmay face this issue.
The plugin when copied into the $HUDSON_HOME\plugin was somehow not really being activeated/recognized. But when i copied it over also to C:\Documents and Settings\mylogin.hudson\plugins and restarted hudson service, voila! it worked.
If anyone knows why this might have occured, kindly record it here for reference. Thanks.
To install a plugin you should use the easy route. In Hudson, go to 'Manage Hudson' -> 'Manager Plugins' -> 'Advanced' (its a tab) and use the 'upload plugin' option.
Than follow the instructions. Usually you have to restart Hudson to actually get the plugin.
Way saver than messing around with the file system. In general the approach you had should have been correct, but there seems to be an issue with your $HUDSON_HOME. Have a look at the "Manage Hudson" -> "Configure System" page. What is the Hudson Home directory displayed on the top of the page? I don't know what Hudson does if it can't access the Home Directory? My assumption is here that Hudson runs as a service with a user account rather than the local system account and that you used a different account to copy the hpi file.
Install Maven Legacy and Maven3 plugins .