setStaging(new Staging.StagingBuilder().command(command) .buildpackUrl(buildpackUrl) .detectedBuildpack(detectedBuildpack) .build());
DockerInfo dockerInfo = createDockerInfo(dockerImage, dockerCredentials); Staging staging = new Staging.StagingBuilder().command(command) .buildpackUrl(buildpack) .stack(stack.getName()) .healthCheckTimeout(healthCheckTimeout) .detectedBuildpack(detectedBuildpack) .healthCheckType(healthCheckType) .healthCheckHttpEndpoint(healthCheckHttpEndpoint) .sshEnabled(sshEnabled) .dockerInfo(dockerInfo) .build();
@Override public Staging parse(List<Map<String, Object>> parametersList) { String command = (String) getPropertyValue(parametersList, SupportedParameters.COMMAND, null); String buildpack = (String) getPropertyValue(parametersList, SupportedParameters.BUILDPACK, null); String stack = (String) getPropertyValue(parametersList, SupportedParameters.STACK, null); Integer healthCheckTimeout = (Integer) getPropertyValue(parametersList, SupportedParameters.HEALTH_CHECK_TIMEOUT, null); String healthCheckType = (String) getPropertyValue(parametersList, SupportedParameters.HEALTH_CHECK_TYPE, null); String healthCheckHttpEndpoint = (String) getPropertyValue(parametersList, SupportedParameters.HEALTH_CHECK_HTTP_ENDPOINT, getDefaultHealthCheckHttpEndpoint(healthCheckType)); Boolean isSshEnabled = (Boolean) getPropertyValue(parametersList, SupportedParameters.ENABLE_SSH, null); DockerInfo dockerInfo = new DockerInfoParser().parse(parametersList); return new Staging.StagingBuilder().command(command) .buildpackUrl(buildpack) .stack(stack) .healthCheckTimeout(healthCheckTimeout) .healthCheckType(healthCheckType) .healthCheckHttpEndpoint(healthCheckHttpEndpoint) .sshEnabled(isSshEnabled) .dockerInfo(dockerInfo) .build(); }
public CloudApplication(String name, String command, String buildpackUrl, int memory, int instances, List<String> uris, List<String> serviceNames, AppState state) { super(CloudEntity.Meta.defaultMeta(), name); this.staging = new Staging.StagingBuilder().command(command) .buildpackUrl(buildpackUrl) .build(); this.memory = memory; this.instances = instances; this.uris = uris; this.services = serviceNames; this.state = state; }
Staging toStaging() { return new Staging.StagingBuilder().command(command) .buildpackUrl(buildpackUrl) .healthCheckTimeout(healthCheckTimeout) .healthCheckType(healthCheckType) .healthCheckHttpEndpoint(healthCheckHttpEndpoint) .sshEnabled(sshEnabled) .build(); } }