All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.continuum.buildagent.ContinuumBuildAgentService Maven / Gradle / Ivy

The newest version!
package org.apache.continuum.buildagent;

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

import java.util.List;
import java.util.Map;
import java.util.Properties;

public interface ContinuumBuildAgentService
{
    void buildProjects( List> projectsBuildContext )
        throws ContinuumBuildAgentException;

    List> getAvailableInstallations()
        throws ContinuumBuildAgentException;

    Map getBuildResult( int projectId )
        throws ContinuumBuildAgentException;

    Map getProjectCurrentlyBuilding()
        throws ContinuumBuildAgentException;

    void cancelBuild()
        throws ContinuumBuildAgentException;

    String generateWorkingCopyContent( int projectId, String userDirectory, String baseUrl, String imagesBaseUrl )
        throws ContinuumBuildAgentException;

    Map getProjectFile( int projectId, String directory, String filename )
        throws ContinuumBuildAgentException;

    Map getReleasePluginParameters( int projectId, String pomFilename )
        throws ContinuumBuildAgentException;

    List> processProject( int projectId, String pomFilename, boolean autoVersionSubmodules )
        throws ContinuumBuildAgentException;

    String releasePrepare( Map project, Properties properties, Map releaseVersion, Map developmentVersion,
                           Map environments, String username )
        throws ContinuumBuildAgentException;

    Map getReleaseResult( String releaseId )
        throws ContinuumBuildAgentException;

    Map getListener( String releaseId )
        throws ContinuumBuildAgentException;

    void removeListener( String releaseId )
        throws ContinuumBuildAgentException;

    String getPreparedReleaseName( String releaseId )
        throws ContinuumBuildAgentException;

    void releasePerform( String releaseId, String goals, String arguments, boolean useReleaseProfile, Map repository,
                         String username )
        throws ContinuumBuildAgentException;

    String releasePerformFromScm( String goals, String arguments, boolean useReleaseProfile, Map repository,
                                  String scmUrl, String scmUsername, String scmPassword, String scmTag,
                                  String scmTagBase, Map environments, String username )
        throws ContinuumBuildAgentException;

    String releaseCleanup( String releaseId )
        throws ContinuumBuildAgentException;

    void releaseRollback( String releaseId, int projectId )
        throws ContinuumBuildAgentException;

    List> getProjectsInPrepareBuildQueue()
        throws ContinuumBuildAgentException;

    List> getProjectsAndBuildDefinitionsInPrepareBuildQueue()
        throws ContinuumBuildAgentException;

    List> getProjectsInBuildQueue()
        throws ContinuumBuildAgentException;

    int getBuildSizeOfAgent()
        throws ContinuumBuildAgentException;

    Map getProjectCurrentlyPreparingBuild()
        throws ContinuumBuildAgentException;

    List> getProjectsAndBuildDefinitionsCurrentlyPreparingBuild()
        throws ContinuumBuildAgentException;

    boolean isProjectGroupInQueue( int projectGroupId );

    boolean isProjectScmRootInQueue( int projectScmRootId, List projectIds );

    boolean isProjectCurrentlyBuilding( int projectId, int buildDefinitionId );

    boolean isProjectInBuildQueue( int projectId, int buildDefinitionId );

    boolean isProjectGroupInPrepareBuildQueue( int projectGroupId );

    boolean isProjectGroupCurrentlyPreparingBuild( int projectGroupId );

    boolean isProjectInPrepareBuildQueue( int projectId, int buildDefinitionId );

    boolean isProjectCurrentlyPreparingBuild( int projectId, int buildDefinitionId );

    boolean removeFromPrepareBuildQueue( int projectGroupId, int scmRootId )
        throws ContinuumBuildAgentException;

    void removeFromPrepareBuildQueue( List hashCodes )
        throws ContinuumBuildAgentException;

    boolean removeFromBuildQueue( int projectId, int builddefinitonId )
        throws ContinuumBuildAgentException;

    void removeFromBuildQueue( List hashCodes )
        throws ContinuumBuildAgentException;

    boolean ping()
        throws ContinuumBuildAgentException;

    /**
     * Get build agent's platform.
     *
     * @return The operating system name of the build agent
     * @throws Exception
     */
    String getBuildAgentPlatform()
        throws ContinuumBuildAgentException;

    /**
     * Determines if build agent is currently executing a build
     *
     * @return true if executing build; false otherwise
     */
    boolean isExecutingBuild();

    /**
     * Determines if build agent is currently executing a release
     *
     * @return true if executing release; false otherwise
     * @throws ContinuumBuildAgentException if unable to determine if buildagent is executing a release
     */
    boolean isExecutingRelease()
        throws ContinuumBuildAgentException;

    /**
     * Execute a directory purge on the build agent
     *
     * @param directoryType  valid types are working and releases
     * @param daysOlder      days older
     * @param retentionCount retention count
     * @param deleteAll      delete all flag
     * @return true if purge is successful; false otherwise
     * @throws ContinuumBuildAgentException error that will occur during the purge
     */
    void executeDirectoryPurge( String directoryType, int daysOlder, int retentionCount, boolean deleteAll )
        throws ContinuumBuildAgentException;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy