Get information for the build number of a job

@param {string} jobName
@param {string} buildNumber
@param {object|undefined} customParams is optional
@param {function} callback
166194
function (jobName, buildNumber, customParams, callback) {
      [jobName, buildNumber, customParams, callback] = doArgs(arguments, ['string', 'string|number', ['object', {}], 'function']);

      doRequest({
        urlPattern: [BUILD_INFO, jobName, buildNumber]
      }, customParams, callback);
    }
398861
function queue_item(queueNumber, customParams, callback) {
      var _doArgs49 = doArgs(arguments, ['string|number', ['object', {}], 'function']);

      var _doArgs50 = _slicedToArray(_doArgs49, 3);

      queueNumber = _doArgs50[0];
      customParams = _doArgs50[1];
      callback = _doArgs50[2];


      doRequest({
        urlPattern: [QUEUE_ITEM, queueNumber]
      }, customParams, callback);
    }
450766
function all_builds(jobName, param, customParams, callback) {

      // TODO better name and handle the "param" ???
      var _doArgs17 = doArgs(arguments, ['string', ['string', 'id,timestamp,result,duration'], ['object', {}], 'function']);

      var _doArgs18 = _slicedToArray(_doArgs17, 4);

      jobName = _doArgs18[0];
      param = _doArgs18[1];
      customParams = _doArgs18[2];
      callback = _doArgs18[3];
      doRequest({
        urlPattern: [ALL_BUILDS, jobName, param],
        bodyProp: 'allBuilds'
      }, customParams, callback);
    }
1065217
function (jobName, customParams, callback) {
      [jobName, customParams, callback] = doArgs(arguments, ['string', ['object', {}], 'function']);

      doRequest({
        urlPattern: [JOB_INFO, jobName]
      }, customParams, callback);
    }
86589
function last_result(jobName, customParams, callback) {
      var _doArgs45 = doArgs(arguments, ['string', ['object', {}], 'function']);

      var _doArgs46 = _slicedToArray(_doArgs45, 3);

      jobName = _doArgs46[0];
      customParams = _doArgs46[1];
      callback = _doArgs46[2];


      this.job_info(jobName, function (error, data) {
        if (error) {
          callback(error, data);
          return;
        }

        var lastResultUrl = data.lastBuild.url;

        doRequest({
          urlPattern: [lastResultUrl + API, jobName]
        }, customParams, callback);
      });
    }
110935
def update_job(self, job_id, build=None, custom_data=None,
                   name=None, passed=None, public=None, tags=None):
        """"""
        method = 'PUT'
        endpoint = '/rest/v1/{}/jobs/{}'.format(self.client.sauce_username,
                                                job_id)
        data = {}
        if build is not None:
            data['build'] = build
        if custom_data is not None:
            data['custom-data'] = custom_data
        if name is not None:
            data['name'] = name
        if passed is not None:
            data['passed'] = passed
        if public is not None:
            data['public'] = public
        if tags is not None:
            data['tags'] = tags
        body = json.dumps(data)
        return self.client.request(method, endpoint, body=body)
316304
function(releaseBuildInfo, cb) {
      orderNumbers = releaseBuildInfo.order_numbers_ready_for_next_release.join(',');
      // Trigger an error when there are no issues that are ready to release
      if('' === orderNumbers) {
        cb('Cannot create release build, there are no issues marked as "Ready for Next Release".');
      }
      else {
        exports.getPeopleInProject(subdomain, username, passwordOrAPIToken, id, function(err, respData) {
          cb(err, respData);
        });
      }
    }
519350
function buildReporter(methods) {
	return {
		supports: methods.supports,
		begin: buildReporterMethod(methods.begin),
		results: buildReporterMethod(methods.results),
		log: {
			debug: buildReporterMethod(methods.debug),
			error: buildReporterMethod(methods.error, 'error'),
			info: buildReporterMethod(methods.info)
		}
	};
}
636673
function build(name, params, cb) {
  var body = { parameter: [] } ;
  _.keys(params).forEach(function (key) {
    body.parameter.push({ name: key, value: params[key] });
  });
  var opts = {
    token: 'nestor'
  };
  this.remoteAccessApi.postJobBuild(name, JSON.stringify(body), _.merge(opts, this.opts.headers), cb);
}
242963
public void addBuild(String buildNumber, Reportable reportable) {

        buildNumbers = (String[]) ArrayUtils.add(buildNumbers, buildNumber);

        passedFeatures = ArrayUtils.add(passedFeatures, reportable.getPassedFeatures());
        failedFeatures = ArrayUtils.add(failedFeatures, reportable.getFailedFeatures());
        totalFeatures = ArrayUtils.add(totalFeatures, reportable.getFeatures());

        passedScenarios = ArrayUtils.add(passedScenarios, reportable.getPassedScenarios());
        failedScenarios = ArrayUtils.add(failedScenarios, reportable.getFailedScenarios());
        totalScenarios = ArrayUtils.add(totalScenarios, reportable.getScenarios());

        passedSteps = ArrayUtils.add(passedSteps, reportable.getPassedSteps());
        failedSteps = ArrayUtils.add(failedSteps, reportable.getFailedSteps());
        skippedSteps = ArrayUtils.add(skippedSteps, reportable.getSkippedSteps());
        pendingSteps = ArrayUtils.add(pendingSteps, reportable.getPendingSteps());
        undefinedSteps = ArrayUtils.add(undefinedSteps, reportable.getUndefinedSteps());
        totalSteps = ArrayUtils.add(totalSteps, reportable.getSteps());

        durations = ArrayUtils.add(durations, reportable.getDuration());

        // this should be removed later but for now correct features and save valid data
        applyPatchForFeatures();
        if (pendingSteps.length < buildNumbers.length) {
            fillMissingSteps();
        }
        if (durations.length < buildNumbers.length) {
            fillMissingDurations();
        }
    }
742969
function buildParams(msg, method, config, params) {
    var p = buildWorkspaceParams(msg, method, config, params)
      .then(function(){
        return buildIntentParams(msg, method, config, params);
      })
      .then(function(){
        return buildExampleParams(msg, method, config, params);
      })
      .then(function(){
        return buildEntityParams(msg, method, config, params);
      })
      .then(function(){
        return buildEntityValueParams(msg, method, config, params);
      })
      .then(function(){
        return buildDialogParams(msg, method, config, params);
      })
      .then(function(){
        return buildExportParams(method, config, params);
      });

    return p;
  }
417440
def _get_or_create_run(build):
    """"""
    release_name, release_number = _get_release_params()
    run_name = request.form.get('run_name', type=str)
    utils.jsonify_assert(run_name, 'run_name required')

    release = (
        models.Release.query
        .filter_by(build_id=build.id, name=release_name, number=release_number)
        .first())
    utils.jsonify_assert(release, 'release does not exist')

    run = (
        models.Run.query
        .filter_by(release_id=release.id, name=run_name)
        .first())
    if not run:
        # Ignore re-reports of the same run name for this release.
        logging.info('Created run: build_id=%r, release_name=%r, '
                     'release_number=%d, run_name=%r',
                     build.id, release.name, release.number, run_name)
        run = models.Run(
            release_id=release.id,
            name=run_name,
            status=models.Run.DATA_PENDING)
        db.session.add(run)
        db.session.flush()

    return release, run
259095
function createForBuild(build) {
  var exports = {};
  
  function bundles(name, sourceType) {
    /*jshint validthis: true */
    var ml = build.bundles(name, sourceType);
    return this.markSafe(ml);
  }
  exports.bundles = bundles;
  
  function link(srcPath, relative) {
    /*jshint validthis: true */
    var ml = build.link(srcPath, relative);
    return this.markSafe(ml);
  }
  exports.link = link;
  
  function script(srcPath, relative) {
    /*jshint validthis: true */
    var ml = build.script(srcPath, relative);
    return this.markSafe(ml);
  }
  exports.script = script;
  
  function scriptCode(js) {
    /*jshint validthis: true */
    var ml = '<script type="text/javascript">' + js + '</script>';
    return this.markSafe(ml);
  }
  exports.scriptCode = scriptCode;

  exports.t = build.translate.bind(build);
  exports.tn = build.translateNumeric.bind(build);

  return exports;
}
189027
def get_build_info(self):
        """"""
        # Retrieve build by revision
        if self.revision:
            th = treeherder.Treeherder(
                APPLICATIONS_TO_FTP_DIRECTORY.get(self.application, self.application),
                self.branch,
                self.platform)
            builds = th.query_builds_by_revision(
                self.revision,
                job_type_name='L10n Nightly' if self.locale_build else 'Nightly')

            if not builds:
                raise errors.NotFoundError('No builds have been found for revision', self.revision)

            # Extract the build folders which are prefixed with the buildid
            self.builds = [build.rsplit('/', 2)[1] for build in builds]
            self.show_matching_builds(self.builds)

            # There is only a single build per revision and platform
            self.build_index = 0
            self.logger.info('Selected build: %s' % self.builds[self.build_index])

            # Retrieve the date from the build folder which is always 19 chars long
            self.date = datetime.strptime(self.builds[self.build_index][:19],
                                          '%Y-%m-%d-%H-%M-%S')

            return

        # Internally we access builds via index
        if self.build_number is not None:
            self.build_index = int(self.build_number) - 1
        else:
            self.build_index = None

        if self.build_id:
            # A build id has been specified. Split up its components so the
            # date and time can be extracted:
            # '20111212042025' -> '2011-12-12 04:20:25'
            self.date = datetime.strptime(self.build_id, '%Y%m%d%H%M%S')

        elif self.date:
            # A date (without time) has been specified. Use its value and the
            # build index to find the requested build for that day.
            try:
                self.date = datetime.strptime(self.date, '%Y-%m-%d')
            except Exception:
                raise ValueError('%s is not a valid date' % self.date)
        else:
            # If no querying option has been specified the latest available
            # build of the given branch has to be identified. We also have to
            # retrieve the date of the build via its build id.
            self.date = self.get_latest_build_date()

        self.builds, self.build_index = self.get_build_info_for_date(
            self.date, self.build_index)
476257
def get_build_info(api_instance, build_id=None,
                   keys=DEFAULT_BUILD_KEYS, wait=False):
    
    build = (api_instance.get_build(build_id) if build_id
             else api_instance.get_last_build())
    output = ""

    if wait:
        build.block_until_complete()

    if 'timestamp' in keys:
        output += str(build.get_timestamp()) + '\n'

    if 'console' in keys:
        output += build.get_console() + '\n'

    if 'scm' in keys:
        # https://github.com/salimfadhley/jenkinsapi/pull/250
        # try/except while this is still occuring
        try:
            output += build.get_revision() + '\n'
        except IndexError:
            pass

    return output
419007
function (jobName, param, customParams, callback) {
      [jobName, param, customParams, callback] = doArgs(arguments, ['string', ['string', 'id,timestamp,result,duration'], ['object', {}], 'function']);

      // TODO better name and handle the "param" ???
      doRequest({
        urlPattern: [ALL_BUILDS, jobName, param],
        bodyProp: 'allBuilds'
      }, customParams, callback);
    }
257991
public Build getBuildInfo(String appName, String buildId) {
        return connection.execute(new BuildInfo(appName, buildId), apiKey);
    }