Instantly share code, notes, and snippets.

Embed
What would you like to do?
Jenkins Remote Build Script
var curl = require('curlrequest');
var jenkinsUrl = 'https://jenkins-co32experience.rhcloud.com/job/production-build/';
var options = {
url: jenkinsUrl + 'build',
method: 'POST',
data: {
token: process.env.BUILD_AUTH_TOKEN
},
user: process.env.BUILDER_USERNAME + ':' + process.env.BUILDER_API_TOKEN
};
curl.request(options, function () {
console.log('Remote build command sent to Jenkins. Check at ' + jenkinsUrl);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment