public boolean isBuilding( Project project ) { return project.getState() == ContinuumProjectState.BUILDING || shellCommandHelper.isRunning( project.getId() ); }
private String getState( Project project, BuildResult build ) { int state = project.getState(); if ( build != null ) { state = build.getState(); } if ( state == ContinuumProjectState.OK ) { return "SUCCESSFUL"; } else if ( state == ContinuumProjectState.FAILED ) { return "FAILURE"; } else if ( state == ContinuumProjectState.ERROR ) { return "ERROR"; } else { log.warn( "Unknown build state " + state + " for project " + project.getId() ); return "ERROR: Unknown build state " + state; } }
public boolean isBuilding( Project project ) { return project.getState() == ContinuumProjectState.BUILDING || getShellCommandHelper().isRunning( project.getId() ); }
public boolean isBuilding( Project project ) { return project.getState() == ContinuumProjectState.BUILDING || getShellCommandHelper().isRunning( project.getId() ); }
public void startProjectBuild( int projectId ) throws ContinuumException { try { Project project = projectDao.getProject( projectId ); project.setOldState( project.getState() ); project.setState( ContinuumProjectState.BUILDING ); projectDao.updateProject( project ); } catch ( ContinuumStoreException e ) { log.error( "Error while updating project's state (projectId=" + projectId + ")", e ); throw new ContinuumException( "Error while updating project's state (projectId=" + projectId + ")", e ); } }
if ( project.getState() == ContinuumProjectState.OK )
private String getState( Project project, BuildResult build ) { int state = project.getState(); if ( build != null ) { state = build.getState(); } if ( state == ContinuumProjectState.OK ) { return "SUCCESSFUL"; } else if ( state == ContinuumProjectState.FAILED ) { return "FAILURE"; } else if ( state == ContinuumProjectState.ERROR ) { return "ERROR"; } else { getLogger().warn( "Unknown build state " + state + " for project " + project.getId() ); return "ERROR: Unknown build state " + state; } }
log.error( "project state=" + project.getState() );
if ( project.getState() != ContinuumProjectState.NEW && project.getState() != ContinuumProjectState.CHECKEDOUT && project.getState() != ContinuumProjectState.OK && project.getState() != ContinuumProjectState.FAILED && project.getState() != ContinuumProjectState.ERROR ) if ( executor.isBuilding( project ) || project.getState() == ContinuumProjectState.UPDATING ) project.setOldState( project.getState() );
private void startBuild( BuildContext context ) throws TaskExecutionException { Project project = context.getProject(); project.setOldState( project.getState() ); project.setState( ContinuumProjectState.BUILDING ); try { store.updateProject( project ); } catch ( ContinuumStoreException e ) { throw new TaskExecutionException( "Error persisting project", e ); } notifierDispatcher.buildStarted( project, context.getBuildDefinition() ); }
private void startBuild( BuildContext context ) throws TaskExecutionException { Project project = context.getProject(); project.setOldState( project.getState() ); project.setState( ContinuumProjectState.BUILDING ); try { projectDao.updateProject( project ); } catch ( ContinuumStoreException e ) { throw new TaskExecutionException( "Error persisting project", e ); } notifierDispatcher.buildStarted( project, context.getBuildDefinition() ); }
if ( project.getState() != ContinuumProjectState.NEW && project.getState() != ContinuumProjectState.CHECKEDOUT && project.getState() != ContinuumProjectState.OK && project.getState() != ContinuumProjectState.FAILED && project.getState() != ContinuumProjectState.ERROR ) if ( executor.isBuilding( project ) || project.getState() == ContinuumProjectState.UPDATING ) project.setOldState( project.getState() ); project.setOldState( project.getState() );
protected String generateMessage( Project project, BuildResult build, ConfigurationService configurationService ) throws NotificationException int state = project.getState();
if ( project.getState() == ContinuumProjectState.OK )
int state = project.getState();
private String generateMessage( Project project, BuildResult build ) throws ContinuumException { int state = project.getState(); if ( build != null ) { state = build.getState(); } String message; if ( state == ContinuumProjectState.OK ) { message = "BUILD SUCCESSFUL: " + project.getName(); } else if ( state == ContinuumProjectState.FAILED ) { message = "BUILD FAILURE: " + project.getName(); } else if ( state == ContinuumProjectState.ERROR ) { message = "BUILD ERROR: " + project.getName(); } else { getLogger().warn( "Unknown build state " + state + " for project " + project.getId() ); message = "ERROR: Unknown build state " + state + " for " + project.getName() + " project"; } return message + " " + getReportUrl( project, build, configurationService ); }
private String generateMessage( Project project, BuildResult build ) throws ContinuumException { int state = project.getState(); if ( build != null ) { state = build.getState(); } String message; if ( state == ContinuumProjectState.OK ) { message = "BUILD SUCCESSFUL: " + project.getName(); } else if ( state == ContinuumProjectState.FAILED ) { message = "BUILD FAILURE: " + project.getName(); } else if ( state == ContinuumProjectState.ERROR ) { message = "BUILD ERROR: " + project.getName(); } else { getLogger().warn( "Unknown build state " + state + " for project " + project.getId() ); message = "ERROR: Unknown build state " + state + " for " + project.getName() + " project"; } return message + " " + getReportUrl( project, build, configurationService ); }
private String generateMessage( Project project, BuildResult build ) throws ContinuumException { int state = project.getState(); if ( build != null ) { state = build.getState(); } String message; if ( state == ContinuumProjectState.OK ) { message = "BUILD SUCCESSFUL: " + project.getName(); } else if ( state == ContinuumProjectState.FAILED ) { message = "BUILD FAILURE: " + project.getName(); } else if ( state == ContinuumProjectState.ERROR ) { message = "BUILD ERROR: " + project.getName(); } else { getLogger().warn( "Unknown build state " + state + " for project " + project.getId() ); message = "ERROR: Unknown build state " + state + " for " + project.getName() + " project"; } return message + " " + getReportUrl( project, build, configurationService ); }