示例#1
0
  /**
   * Deploy the latest built artifact of the given job
   *
   * @param jobName jobname
   * @param artifactType car/war
   * @param stage URLs to which the artifact will be deployed into
   * @throws AppFactoryException
   */
  public void deployLatestSuccessArtifact(
      String applicationId,
      String version,
      String revision,
      String artifactType,
      String stage,
      String tenantDomain,
      String userName,
      String deployAction,
      String repoFrom)
      throws AppFactoryException {

    String jobName =
        ServiceHolder.getContinuousIntegrationSystemDriver()
            .getJobName(
                applicationId, version,
                userName, repoFrom);
    /*If this is a freestyle project deployment is done through a new build otherwise new changes to the repo after
    /last build would not be deployed. */
    connector.deployLatestSuccessArtifact(
        jobName,
        artifactType,
        stage,
        tenantDomain,
        userName,
        AppFactoryConstants.DEPLOY_ACTION_LABEL_ARTIFACT,
        repoFrom);
  }
示例#2
0
 public void deployPromotedArtifact(
     String applicationId,
     String version,
     String revision,
     String artifactType,
     String stage,
     String tenantDomain,
     String userName)
     throws AppFactoryException {
   String jobName =
       ServiceHolder.getContinuousIntegrationSystemDriver()
           .getJobName(applicationId, version, revision);
   connector.deployPromotedArtifact(jobName, artifactType, stage, tenantDomain, userName);
 }