All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cloudsnorkel.cdk.github.runners.RunnerImageBuilder Maven / Gradle / Ivy

Go to download

CDK construct to create GitHub Actions self-hosted runners. A webhook listens to events and creates ephemeral runners on the fly.

There is a newer version: 0.14.6
Show newest version
package com.cloudsnorkel.cdk.github.runners;

/**
 * (experimental) GitHub Runner image builder. Builds a Docker image or AMI with GitHub Runner and other requirements installed.
 * 

* Images can be customized before passed into the provider by adding or removing components to be installed. *

* Images are rebuilt every week by default to ensure that the latest security patches are applied. */ @javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-14T02:42:19.531Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Jsii(module = com.cloudsnorkel.cdk.github.runners.$Module.class, fqn = "@cloudsnorkel/cdk-github-runners.RunnerImageBuilder") public abstract class RunnerImageBuilder extends software.constructs.Construct implements com.cloudsnorkel.cdk.github.runners.IConfigurableRunnerImageBuilder { protected RunnerImageBuilder(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected RunnerImageBuilder(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) protected RunnerImageBuilder(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.RunnerImageBuilderProps 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) protected RunnerImageBuilder(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) Create a new image builder based on the provided properties. *

* The implementation will differ based on the OS, architecture, and requested builder type. *

* @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 static @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.IConfigurableRunnerImageBuilder doNew(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.RunnerImageBuilderProps props) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.cloudsnorkel.cdk.github.runners.RunnerImageBuilder.class, "new", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.IConfigurableRunnerImageBuilder.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), props }); } /** * (experimental) Create a new image builder based on the provided properties. *

* The implementation will differ based on the OS, architecture, and requested builder type. *

* @param scope This parameter is required. * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.IConfigurableRunnerImageBuilder doNew(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.cloudsnorkel.cdk.github.runners.RunnerImageBuilder.class, "new", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.IConfigurableRunnerImageBuilder.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required") }); } /** * (experimental) Add a component to the image builder. *

* The component will be added to the end of the list of components. *

* @param component This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public void addComponent(final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerImageComponent component) { software.amazon.jsii.Kernel.call(this, "addComponent", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(component, "component is required") }); } /** * (experimental) Build and return an AMI with GitHub Runner installed in it. *

* Anything that ends up with a launch template pointing to an AMI that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing AMI and nothing else. *

* The AMI can be further updated over time manually or using a schedule as long as it is always written to the same launch template. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public abstract @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerAmi bindAmi(); /** * (experimental) Build and return a Docker image with GitHub Runner installed in it. *

* Anything that ends up with an ECR repository containing a Docker image that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing image and nothing else. *

* It's important that the specified image tag be available at the time the repository is available. Providers usually assume the image is ready and will fail if it's not. *

* The image can be further updated over time manually or using a schedule as long as it is always written to the same tag. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public abstract @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerImage bindDockerImage(); /** * (experimental) Remove a component from the image builder. *

* Removal is done by component name. Multiple components with the same name will all be removed. *

* @param component This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public void removeComponent(final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerImageComponent component) { software.amazon.jsii.Kernel.call(this, "removeComponent", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(component, "component is required") }); } /** * (experimental) The network connections associated with this resource. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public abstract @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.Connections getConnections(); /** * (experimental) The principal to grant permissions to. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public abstract @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IPrincipal getGrantPrincipal(); /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) protected @org.jetbrains.annotations.NotNull java.util.List getComponents() { return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "components", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class)))); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) protected void setComponents(final @org.jetbrains.annotations.NotNull java.util.List value) { software.amazon.jsii.Kernel.set(this, "components", java.util.Objects.requireNonNull(value, "components is required")); } /** * A proxy class which represents a concrete javascript instance of this type. */ @software.amazon.jsii.Internal private static final class Jsii$Proxy extends com.cloudsnorkel.cdk.github.runners.RunnerImageBuilder implements com.cloudsnorkel.cdk.github.runners.IConfigurableRunnerImageBuilder.Jsii$Default, software.constructs.IConstruct.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } /** * (experimental) The network connections associated with this resource. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.Connections getConnections() { return software.amazon.jsii.Kernel.get(this, "connections", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.Connections.class)); } /** * (experimental) The principal to grant permissions to. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IPrincipal getGrantPrincipal() { return software.amazon.jsii.Kernel.get(this, "grantPrincipal", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.iam.IPrincipal.class)); } /** * (experimental) Build and return an AMI with GitHub Runner installed in it. *

* Anything that ends up with a launch template pointing to an AMI that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing AMI and nothing else. *

* The AMI can be further updated over time manually or using a schedule as long as it is always written to the same launch template. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerAmi bindAmi() { return software.amazon.jsii.Kernel.call(this, "bindAmi", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerAmi.class)); } /** * (experimental) Build and return a Docker image with GitHub Runner installed in it. *

* Anything that ends up with an ECR repository containing a Docker image that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing image and nothing else. *

* It's important that the specified image tag be available at the time the repository is available. Providers usually assume the image is ready and will fail if it's not. *

* The image can be further updated over time manually or using a schedule as long as it is always written to the same tag. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerImage bindDockerImage() { return software.amazon.jsii.Kernel.call(this, "bindDockerImage", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImage.class)); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy