Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function processPackageList(tag, tagID, packageList){
- // We get a list of package objects for the tag, and we will construct a list of latest builds
- var packageName;
- console.log('Retrieved ' + packageList.length + ' packages for tag ' + tag);
- console.log('Building latest builds list...');
- function getLatestBuild(pkg){
- packageName = pkg['package_name'];
- console.log('Retrieving build for ' + packageName);
- var client = xmlrpc.createClient({ host: 'someurl', port: 80, path: '/brewhub'});
- client.methodCall('getLatestBuilds', [tag, {'__starstar': 1, 'package': packageName}], function (error, value){
- if (value.length == 1){
- latestPackages.push({'packageName': packageName, 'nvr': value[0]['nvr']});
- console.log('Adding Build info for ' + packageName);
- }
- });
- }
- async.forEach(packageList, getLatestBuild, function(err){getBuilds()});
- }
Add Comment
Please, Sign In to add comment