예제 #1
0
  private void printUsedBaselines(ClearCaseLogger logger, List<Baseline> latestBls) {
    for (Baseline bl : latestBls) {
      String blString;

      if (bl.isCreated()) {
        blString = "* baseline: %s (created on component %s)";
      } else {
        blString = "  baseline: %s (component %s unmodified)";
      }

      logger.log(String.format(blString, bl.toString(), bl.getComponent().toString()));
    }
  }
예제 #2
0
  /**
   * Publish the names of all the baselines created so that other plugins can use them.
   *
   * @param build the build where to publish the parameters
   */
  private void publishBaselinesAsParams(AbstractBuild<?, ?> build, List<Baseline> baselines) {
    if (baselines != null && !baselines.isEmpty()) {
      int i = 1;
      for (Baseline bl : baselines) {
        String paramKey = ENV_CC_BASELINE + i++;

        String description = "";
        if (bl.isCreated()) {
          description += "<b>CREATED</b> ";
        }
        description += "on component: " + bl.getComponent().toString();
        if (bl.getComponent().isComposite()) {
          description += " <i><b>(COMPOSITE)</b></i>";
        } else {
          if (bl.getComponent().isReadOnly()) {
            description += " <i><b>(READ ONLY)</b></i>";
          }
        }
        CCParametersAction.addBuildParameter(
            build, new StringParameterValue(paramKey, bl.toString(), description));
      }
    }
  }
예제 #3
0
 private void markCreatedBaselines(List<Baseline> createdBls, List<Baseline> latestBls) {
   for (Baseline latestBl : latestBls) {
     for (Baseline createdBl : createdBls) {
       if (latestBl.getName().equals(createdBl.getName())) {
         latestBl.setCreated(true);
         /* we transfer the component & pvob information here so they can be used for
          * the promotion and recomendation of the created baselines later. */
         createdBl.setComponent(latestBl.getComponent());
         createdBl.setPvob(latestBl.getPvob());
         break;
       }
     }
   }
 }