Package org.hudsonci.service

Examples of org.hudsonci.service.ServiceRuntimeException


        this.security.checkPermission(build, Run.DELETE);
        log.debug("Deleting build: {} #{}", project.getName(), buildNumber);
        try {
            build.delete();
        } catch (IOException e) {
            throw new ServiceRuntimeException("Delete failed for build " + project.getName() + " #" + buildNumber, e);
        }
    }
View Full Code Here


        log.debug("{} build: {} #{}", $(release ? "Releasing" : "Keeping", project.getName(), buildNumber));

        try {
            build.keepLog(!release);
        } catch (IOException e) {
            throw new ServiceRuntimeException((release ? "Releasing failed for build #" : "Keeping failed for build ")
                    + project.getName() + " #" + buildNumber);
        }
    }
View Full Code Here

        log.debug("Stopping build: {} #{}", project.getName(), buildNumber);
        try {
            // Security: doStop eventually checks to see if the task owner has permission to abort the build
            build.doStop(DummyStaplerRequest.INSTANCE, DummyStaplerResponse.INSTANCE);
        } catch (IOException e) {
            throw new ServiceRuntimeException("Stop failed for " + project.getName() + " #" + buildNumber, e);
        } catch (ServletException e) {
            throw new ServiceRuntimeException("Stop failed for " + project.getName() + " #" + buildNumber, e);
        }
    }
View Full Code Here

        {
            getHudson().doReload();
        }
        catch (IOException ex)
        {
            throw new ServiceRuntimeException("Could not reload.", ex);
        }
    }
View Full Code Here

                getHudson().restart();
            }
        }
        catch (RestartNotSupportedException ex)
        {
            throw new ServiceRuntimeException("Restart not supported", ex);
        }
    }
View Full Code Here

        {
            getHudson().safeRestart();
        }
        catch (RestartNotSupportedException ex)
        {
            throw new ServiceRuntimeException("Restart not supported", ex);
        }
    }
View Full Code Here

        {
            getHudson().restart();
        }
        catch (RestartNotSupportedException ex)
        {
            throw new ServiceRuntimeException("Restart not supported", ex);
        }
    }
View Full Code Here

        }

        try {
            return getHudson().copy(src, targetProjectName);
        } catch (IOException ex) {
            throw new ServiceRuntimeException(String.format("Project copy failed from %s to %s", src.getName(),
                    targetProjectName), ex);
        }
    }
View Full Code Here

        }

        try {
            return getHudson().createProjectFromXML(projectName, xml);
        } catch (IOException ex) {
            throw new ServiceRuntimeException(String.format("Project creation failed for %s", projectName), ex);
        }
    }
View Full Code Here

TOP

Related Classes of org.hudsonci.service.ServiceRuntimeException

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.