/** @deprecated use {@link #buildWithParameters(StaplerRequest, StaplerResponse, TimeDuration)} */ @Deprecated public void buildWithParameters(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { buildWithParameters(req,rsp,TimeDuration.fromString(req.getParameter("delay"))); }
/** * Standard implementation of {@link ParameterizedJob#doBuildWithParameters}. */ @SuppressWarnings("deprecation") public final void doBuildWithParameters(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException { hudson.model.BuildAuthorizationToken.checkPermission(asJob(), asJob().getAuthToken(), req, rsp); ParametersDefinitionProperty pp = asJob().getProperty(ParametersDefinitionProperty.class); if (!asJob().isBuildable()) { throw HttpResponses.error(SC_CONFLICT, new IOException(asJob().getFullName() + " is not buildable!")); } if (pp != null) { pp.buildWithParameters(req, rsp, delay); } else { throw new IllegalStateException("This build is not parameterized!"); } }
/** @deprecated use {@link #buildWithParameters(StaplerRequest, StaplerResponse, TimeDuration)} */ @Deprecated public void buildWithParameters(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { buildWithParameters(req,rsp,TimeDuration.fromString(req.getParameter("delay"))); }
/** * Supports build trigger with parameters via an HTTP GET or POST. * Currently only String parameters are supported. */ public void doBuildWithParameters(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { BuildAuthorizationToken.checkPermission(this, authToken, req, rsp); ParametersDefinitionProperty pp = getProperty(ParametersDefinitionProperty.class); if (pp != null) { pp.buildWithParameters(req,rsp); } else { throw new IllegalStateException("This build is not parameterized!"); } }
/** * Supports build trigger with parameters via an HTTP GET or POST. Currently * only String parameters are supported. */ public void doBuildWithParameters(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { BuildAuthorizationToken.checkPermission(this, authToken, req, rsp); ParametersDefinitionProperty pp = getProperty(ParametersDefinitionProperty.class); if (pp != null) { pp.buildWithParameters(req, rsp); } else { throw new IllegalStateException("This build is not parameterized!"); } }
/** * Supports build trigger with parameters via an HTTP GET or POST. * Currently only String parameters are supported. */ public void doBuildWithParameters(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { BuildAuthorizationToken.checkPermission(this, authToken, req, rsp); ParametersDefinitionProperty pp = getProperty(ParametersDefinitionProperty.class); if (pp != null) { pp.buildWithParameters(req,rsp); } else { throw new IllegalStateException("This build is not parameterized!"); } }
/** * Supports build trigger with parameters via an HTTP GET or POST. Currently * only String parameters are supported. */ public void doBuildWithParameters(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { BuildAuthorizationToken.checkPermission(this, authToken, req, rsp); ParametersDefinitionProperty pp = getProperty(ParametersDefinitionProperty.class); if (pp != null) { synchronized(cliBuildSchedulelock) { pp.setOwner(this); pp.buildWithParameters(req, rsp); } } else { throw new IllegalStateException("This build is not parameterized!"); } }
/** * Standard implementation of {@link ParameterizedJob#doBuildWithParameters}. */ @SuppressWarnings("deprecation") public final void doBuildWithParameters(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException { hudson.model.BuildAuthorizationToken.checkPermission(asJob(), asJob().getAuthToken(), req, rsp); ParametersDefinitionProperty pp = asJob().getProperty(ParametersDefinitionProperty.class); if (!asJob().isBuildable()) { throw HttpResponses.error(SC_CONFLICT, new IOException(asJob().getFullName() + " is not buildable!")); } if (pp != null) { pp.buildWithParameters(req, rsp, delay); } else { throw new IllegalStateException("This build is not parameterized!"); } }