cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nikhilkh <...@git.apache.org>
Subject [GitHub] cordova-medic pull request: Add medic command to download BuildBot...
Date Tue, 19 Apr 2016 17:30:05 GMT
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-medic/pull/87#discussion_r60274259
  
    --- Diff: medic/medic-downloadlogs.js ---
    @@ -0,0 +1,80 @@
    +var path = require('path'),
    +    fs = require('fs'),
    +    https = require('https'),
    +    optimist = require('optimist');
    +    q = require('Q'),
    +    mkdirp = require('mkdirp')
    +    util = require('util');
    +
    +var SERVER = "https://ci.apache.org";
    +var BUILDERS = ["cordova-windows-store8.1", "cordova-ios", "cordova-windows-phone8.1",
"cordova-android-osx","cordova-android-win"];
    +//var BUILDERS = ["cordova-windows-store8.1"];
    +var STEPS = ["running-tests", "gathering-logs", "getting-test-results"];
    +
    +function downloadLogs(outputDir) {
    +    var counter = 0;
    +    var builderPromises = BUILDERS.map(function(builder) {
    +        //https://ci.apache.org/json/builders/cordova-ios/builds/_all
    +        var buildInfoFile = path.join(outputDir, builder + ".json");
    +        var buildInfoUrl = util.format("%s/json/builders/%s/builds/_all", SERVER, builder);
    +        return download(buildInfoUrl, buildInfoFile).then(function() {
    +            var buildInfo = JSON.parse(fs.readFileSync(buildInfoFile));
    +            var promises = [];
    +            for(var buildNumber in buildInfo) {
    +                var steps = buildInfo[buildNumber].steps.filter(
    +                    function(step) {
    +                        return STEPS.indexOf(step.name) !== -1 && step.logs &&
step.logs.length > 0;
    +                    });
    +                steps.forEach(function(step) {
    +                    var filename = util.format("%s_%s_%s_stdio.log", builder, buildNumber,
step.name);
    +                    if(step.logs[0].length !== 2) {
    +                        throw "Unexpected build info schema";
    --- End diff --
    
    Fixed!
    
    ---
    In reply to: [59607181](https://github.com/apache/cordova-medic/pull/87#discussion_r59607181)
[](ancestors = 59607181)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message