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

Cryptic Sonar Log Output in Jenkins #20

Open
Vad1mo opened this issue Jul 7, 2016 · 0 comments
Open

Cryptic Sonar Log Output in Jenkins #20

Vad1mo opened this issue Jul 7, 2016 · 0 comments

Comments

@Vad1mo
Copy link

Vad1mo commented Jul 7, 2016

I have this cryptic output in jenkins when then sonar is running.

[13:33:06] Using gulpfile /var/jenkins_home/workspace/webapp/webapp_build/gulpfile.js
[13:33:06] Starting 'sonar'...
[13:33:06] <Buffer 53 6f 6e 61 72 51 75 62 65 20 52 75 6e 6e 65 72 20 32 2e 34 0a>
[13:33:06] <Buffer 4a 61 76 61 20 31 2e 38 2e 30 5f 37 32 2d 69 6e 74 65 72 6e 61 6c 20 4f 72 61 63 6c 65 20 43 6f 72 70 6f 72 61 74 69 6f 6e 20 28 36 34 2d 62 69 74 29 ... >
[13:33:07] <Buffer 49 4e 46 4f 3a 20 57 6f 72 6b 20 64 69 72 65 63 74 6f 72 79 3a 20 2f 76 61 72 2f 6a 65 6e 6b 69 6e 73 5f 68 6f 6d 65 2f 77 6f 72 6b 73 70 61 63 65 2f ... >
[13:33:07] <Buffer 49 4e 46 4f 3a 20 53 6f 6e 61 72 51 75 62 65 20 53 65 72 76 65 72 20 35 2e 36>
[13:33:07] <Buffer 0a

when I redirect to sonar runner output to file and take a look at the file I see correct message.

This is my config

const gulp      = require('gulp');
const sonar     = require('gulp-sonar');
const filter    = require('gulp-filter');
const util      = require('gulp-util');


var pkg = require('../package.json');

gulp.task('sonar', function () {

    var options = {
        sonar: {
            host: {
                url: process.env.SONAR_HOST_URL
            },
            jdbc: {
                url: process.env.SONAR_JDBC_URL,
                username: process.env.SONAR_JDBC_USERNAME,
                password: process.env.SONAR_JDBC_PASSWORD
            },
            projectKey: pkg.name,
            projectName: pkg.name,
            projectVersion: pkg.version,
            // comma-delimited string of source directories 
            sources: 'app,tests, e2e-tests',
            language: 'js',
            sourceEncoding: 'UTF-8',
            /*javascript: {
                lcov: {
                    reportPath: 'test-reports/coverage'
                }
            },
            genericcoverage: {
                unitTestReportPaths: 'test-reports'
            },*/
            exec: {
                // All these properties will be send to the child_process.exec method (see: https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback ) 
                // Increase the amount of data allowed on stdout or stderr (if this value is exceeded then the child process is killed, and the gulp-sonar will fail). 
                maxBuffer : 1024*4096
            }
        }
    };

    // gulp source doesn't matter, all files are referenced in options object above 
    return gulp.src('README.md', { read: false })
        .pipe(sonar(options))

        .on('error', util.log);
});
@Vad1mo Vad1mo changed the title Cryptic Sonar Output in jenkins Cryptic Sonar Log Output in Jenkins Jul 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant