Package org.dtk.resources.build.manager

Examples of org.dtk.resources.build.manager.BuildState


    // Calculate future time when we stop timeout polling....
    long futureTimeMillis = System.currentTimeMillis() + (timeOutSeconds * 1000);
   
    do {
      Map<String, String> stateDetails = (Map<String, String>) getJsonResponse(statusURL);
      BuildState buildState = BuildState.valueOf(stateDetails.get("state"));

      if (buildState.equals(BuildState.COMPLETED)) {
        // If we have a status of completed, check result!
        buildResultLocation = stateDetails.get("result");
        assertNotNull(buildResultLocation);
        break
      } else {
        assertTrue(buildState.equals(BuildState.NOT_STARTED) || buildState.equals(BuildState.BUILDING));
      }
    } while (System.currentTimeMillis() < futureTimeMillis);

    // If we didn't receive a build response by this time,
    // we've given up! Simple build should not take more than
View Full Code Here


   */
  protected String verifyCompletedBuildStatus(String statusURL)
    throws ClientProtocolException, IOException {
    Map<String, String> response = (Map<String, String>) getJsonResponse(statusURL);
   
    BuildState buildState = BuildState.valueOf(response.get("state"));
    assertEquals(BuildState.COMPLETED, buildState);
   
    String buildResultLocation = response.get("result");
    assertNotNull(buildResultLocation);
   
View Full Code Here

    HashMap<String, String> buildStatus = new HashMap<String, String>();

    BuildStatusManager buildStateManager = BuildStatusManager.getInstance();
   
    // Retrieve current build state for reference build
    BuildState buildState = buildStateManager.retrieveBuildState(reference);
   
    // Store resulting state in the response
    buildStatus.put("state", buildState.toString());
    buildStatus.put("logs", buildStateManager.getCompleteBuildLog(reference));
    // If build has completed, include resource link, otherwise just include
    // current logs.
    if (buildState == BuildState.COMPLETED) {
      buildStatus.put("result", layersBuildResourcePath(request, reference));
View Full Code Here

  public StreamingOutput retrieveBuildResult(@Context HttpServletResponse response, @PathParam("reference") String reference) {
    logger.entering(this.getClass().getName(), "retrieveBuildResult");
    BuildStatusManager buildStateManager = BuildStatusManager.getInstance();
   
    // Retrieve current build state for reference build
    BuildState buildState = buildStateManager.retrieveBuildState(reference);
   
    if (buildState != BuildState.COMPLETED) {
      throw new MissingResourceException(missingBuildResourceErrorText);
    }
View Full Code Here

     * version of the request is not already available. Build state is set
     * accordingly based upon success of build request.
     */
  @Override
  public void run() {
    BuildState finishState = BuildState.FAILED;

    String buildResultPath = buildRequest.getBuildResultPath();
   
    // Check if a version of the toolkit has already been built with the same
    // parameters. If so, we can just use this cached version rather than rebuilding.
View Full Code Here

   * archive, ready for access by the user.
   *
   * @return Status of the build after completion
   */
  protected BuildState executeBuildProcess() {   
    BuildState finishedState = BuildState.FAILED;       
    try {     
      ProfileBuilder profileBuilder = setupProfileBuilder();
     
      // Execute the build scripts for this request and, if successful, create the archive file
      // with relevant build artifacts
View Full Code Here

TOP

Related Classes of org.dtk.resources.build.manager.BuildState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.