com.cloudsnorkel.cdk.github.runners.CodeBuildRunner Maven / Gradle / Ivy
Show all versions of cdk.github.runners Show documentation
package com.cloudsnorkel.cdk.github.runners;
/**
* @deprecated use {@link CodeBuildRunnerProvider }
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-14T02:42:19.390Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
@software.amazon.jsii.Jsii(module = com.cloudsnorkel.cdk.github.runners.$Module.class, fqn = "@cloudsnorkel/cdk-github-runners.CodeBuildRunner")
public class CodeBuildRunner extends com.cloudsnorkel.cdk.github.runners.CodeBuildRunnerProvider {
protected CodeBuildRunner(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CodeBuildRunner(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public CodeBuildRunner(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.github.runners.CodeBuildRunnerProviderProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), props });
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public CodeBuildRunner(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required") });
}
/**
* (experimental) A fluent builder for {@link com.cloudsnorkel.cdk.github.runners.CodeBuildRunner}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private com.cloudsnorkel.cdk.github.runners.CodeBuildRunnerProviderProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
}
/**
* (experimental) The number of days log events are kept in CloudWatch Logs.
*
* When updating
* this property, unsetting it doesn't remove the log retention policy. To
* remove the retention policy, set the value to INFINITE
.
*
* Default: logs.RetentionDays.ONE_MONTH
*
* @return {@code this}
* @param logRetention The number of days log events are kept in CloudWatch Logs. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder logRetention(final software.amazon.awscdk.services.logs.RetentionDays logRetention) {
this.props().logRetention(logRetention);
return this;
}
/**
* @return {@code this}
* @deprecated use {@link retryOptions } on {@link GitHubRunners } instead
* @param retryOptions This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder retryOptions(final com.cloudsnorkel.cdk.github.runners.ProviderRetryOptions retryOptions) {
this.props().retryOptions(retryOptions);
return this;
}
/**
* (experimental) The type of compute to use for this build.
*
* See the {@link ComputeType} enum for the possible values.
*
* Default: {@link ComputeType#SMALL }
*
* @return {@code this}
* @param computeType The type of compute to use for this build. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder computeType(final software.amazon.awscdk.services.codebuild.ComputeType computeType) {
this.props().computeType(computeType);
return this;
}
/**
* (experimental) Support building and running Docker images by enabling Docker-in-Docker (dind) and the required CodeBuild privileged mode.
*
* Disabling this can
* speed up provisioning of CodeBuild runners. If you don't intend on running or building Docker images, disable this for faster start-up times.
*
* Default: true
*
* @return {@code this}
* @param dockerInDocker Support building and running Docker images by enabling Docker-in-Docker (dind) and the required CodeBuild privileged mode. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder dockerInDocker(final java.lang.Boolean dockerInDocker) {
this.props().dockerInDocker(dockerInDocker);
return this;
}
/**
* (experimental) Runner image builder used to build Docker images containing GitHub Runner and all requirements.
*
* The image builder must contain the {@link RunnerImageComponent.docker} component unless `dockerInDocker` is set to false.
* The image builder determines the OS and architecture of the runner.
*
* Default: CodeBuildRunnerProvider.imageBuilder()
*
* @return {@code this}
* @param imageBuilder Runner image builder used to build Docker images containing GitHub Runner and all requirements. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder imageBuilder(final com.cloudsnorkel.cdk.github.runners.IRunnerImageBuilder imageBuilder) {
this.props().imageBuilder(imageBuilder);
return this;
}
/**
* (deprecated) GitHub Actions label used for this provider.
*
* Default: undefined
*
* @return {@code this}
* @deprecated use {@link labels } instead
* @param label GitHub Actions label used for this provider. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder label(final java.lang.String label) {
this.props().label(label);
return this;
}
/**
* (experimental) GitHub Actions labels used for this provider.
*
* These labels are used to identify which provider should spawn a new on-demand runner. Every job sends a webhook with the labels it's looking for
* based on runs-on. We match the labels from the webhook with the labels specified here. If all the labels specified here are present in the
* job's labels, this provider will be chosen and spawn a new runner.
*
* Default: ['codebuild']
*
* @return {@code this}
* @param labels GitHub Actions labels used for this provider. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder labels(final java.util.List labels) {
this.props().labels(labels);
return this;
}
/**
* (deprecated) Security group to assign to this instance.
*
* Default: public project with no security group
*
* @return {@code this}
* @deprecated use {@link securityGroups }
* @param securityGroup Security group to assign to this instance. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder securityGroup(final software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup) {
this.props().securityGroup(securityGroup);
return this;
}
/**
* (experimental) Security groups to assign to this instance.
*
* Default: a new security group, if {@link vpc } is used
*
* @return {@code this}
* @param securityGroups Security groups to assign to this instance. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder securityGroups(final java.util.List extends software.amazon.awscdk.services.ec2.ISecurityGroup> securityGroups) {
this.props().securityGroups(securityGroups);
return this;
}
/**
* (experimental) Where to place the network interfaces within the VPC.
*
* Default: no subnet
*
* @return {@code this}
* @param subnetSelection Where to place the network interfaces within the VPC. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder subnetSelection(final software.amazon.awscdk.services.ec2.SubnetSelection subnetSelection) {
this.props().subnetSelection(subnetSelection);
return this;
}
/**
* (experimental) The number of minutes after which AWS CodeBuild stops the build if it's not complete.
*
* For valid values, see the timeoutInMinutes field in the AWS
* CodeBuild User Guide.
*
* Default: Duration.hours(1)
*
* @return {@code this}
* @param timeout The number of minutes after which AWS CodeBuild stops the build if it's not complete. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder timeout(final software.amazon.awscdk.Duration timeout) {
this.props().timeout(timeout);
return this;
}
/**
* (experimental) VPC to launch the runners in.
*
* Default: no VPC
*
* @return {@code this}
* @param vpc VPC to launch the runners in. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder vpc(final software.amazon.awscdk.services.ec2.IVpc vpc) {
this.props().vpc(vpc);
return this;
}
/**
* @return a newly built instance of {@link com.cloudsnorkel.cdk.github.runners.CodeBuildRunner}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public com.cloudsnorkel.cdk.github.runners.CodeBuildRunner build() {
return new com.cloudsnorkel.cdk.github.runners.CodeBuildRunner(
this.scope,
this.id,
this.props != null ? this.props.build() : null
);
}
private com.cloudsnorkel.cdk.github.runners.CodeBuildRunnerProviderProps.Builder props() {
if (this.props == null) {
this.props = new com.cloudsnorkel.cdk.github.runners.CodeBuildRunnerProviderProps.Builder();
}
return this.props;
}
}
}