-
-
Save gnarf/492f5a995697047e9cf0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var botio = require( process.env.BOTIO_MODULE ), | |
cmdqueue = []; | |
require('shelljs/global'); | |
function next() { | |
var fn = cmdqueue.shift(); | |
if ( fn ) { | |
fn(); | |
} | |
} | |
function queue( cmd, callback ) { | |
function cb( error, data ) { | |
if ( callback ) { | |
callback( error, data ); | |
} | |
if (error) { | |
botio.message( "## Failed running:"); | |
botio.message( "```shell" ); | |
botio.message( cmd ); | |
botio.message( "```" ); | |
process.exit( 1 ); | |
} else { | |
next(); | |
} | |
} | |
cmdqueue.push( function() { | |
exec( cmd, { async: true, silent: false }, cb ); | |
}); | |
} | |
queue( "npm install -q --color false" ); | |
queue( "grunt --no-color" ); | |
queue( "/usr/local/bin/tools/jenkins-testswarm-static-copy.sh jquery " + botio.head_sha ); | |
queue( "grunt --no-color testswarm:" + botio.head_sha + ":/usr/local/bin/tools/node-testswarm-config.json", function( error, output ) { | |
var submittedMatch = output.match( /Submited job (\d+) (http:\/\/swarm.jquery.org\/job\/\d+)/ ); | |
if (submittedMatch) { | |
botio.message("## Swarm URL: " + submittedMatch[2]); | |
} | |
}); | |
next(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment