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

com.cloudsnorkel.cdk.github.runners.RunnerImageComponent 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) Components are used to build runner images.
 * 

* They can run commands in the image, copy files into the image, and run some Docker commands. */ @javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-14T02:42:19.535Z") @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.RunnerImageComponent") public abstract class RunnerImageComponent extends software.amazon.jsii.JsiiObject { protected RunnerImageComponent(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected RunnerImageComponent(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) protected RunnerImageComponent() { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this); } /** * (experimental) A component to install the AWS CLI. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerImageComponent awsCli() { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class, "awsCli", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class)); } /** * (experimental) Define a custom component that can run commands in the image, copy files into the image, and run some Docker commands. *

* The order of operations is (1) assets (2) commands (3) docker commands. *

* Use this to customize the image for the runner. *

* WARNING: Docker commands are not guaranteed to be included before the next component *

* @param props 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.RunnerImageComponent custom(final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerImageComponentCustomProps props) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class, "custom", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class), new Object[] { java.util.Objects.requireNonNull(props, "props is required") }); } /** * (experimental) A component to install Docker. *

* On Windows this sets up dockerd for Windows containers without Docker Desktop. If you need Linux containers on Windows, you'll need to install Docker Desktop which doesn't seem to play well with servers (PRs welcome). */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerImageComponent docker() { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class, "docker", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class)); } /** * (deprecated) A component to install Docker-in-Docker. *

* @deprecated use docker() */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public static @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerImageComponent dockerInDocker() { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class, "dockerInDocker", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class)); } /** * (experimental) A component to add environment variables for jobs the runner executes. *

* These variables only affect the jobs ran by the runner. They are not global. They do not affect other components. * It is not recommended to use this component to pass secrets. Instead, use GitHub Secrets or AWS Secrets Manager. * Must be used after the {@link githubRunner} component. *

* @param vars 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.RunnerImageComponent environmentVariables(final @org.jetbrains.annotations.NotNull java.util.Map vars) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class, "environmentVariables", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class), new Object[] { java.util.Objects.requireNonNull(vars, "vars is required") }); } /** * (experimental) A component to add a trusted certificate authority. *

* This can be used to support GitHub Enterprise Server with self-signed certificate. *

* @param source path to certificate file in PEM format. This parameter is required. * @param name unique certificate name to be used on runner file system. 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.RunnerImageComponent extraCertificates(final @org.jetbrains.annotations.NotNull java.lang.String source, final @org.jetbrains.annotations.NotNull java.lang.String name) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class, "extraCertificates", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class), new Object[] { java.util.Objects.requireNonNull(source, "source is required"), java.util.Objects.requireNonNull(name, "name is required") }); } /** * (experimental) A component to install the GitHub CLI. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerImageComponent git() { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class, "git", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class)); } /** * (experimental) A component to install the GitHub CLI. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerImageComponent githubCli() { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class, "githubCli", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class)); } /** * (experimental) A component to install the GitHub Actions Runner. *

* This is the actual executable that connects to GitHub to ask for jobs and then execute them. *

* @param runnerVersion The version of the runner to install. 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.RunnerImageComponent githubRunner(final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerVersion runnerVersion) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class, "githubRunner", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class), new Object[] { java.util.Objects.requireNonNull(runnerVersion, "runnerVersion is required") }); } /** * (experimental) A component to set up the required Lambda entrypoint for Lambda runners. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerImageComponent lambdaEntrypoint() { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class, "lambdaEntrypoint", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class)); } /** * (experimental) A component to install the required packages for the runner. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerImageComponent requiredPackages() { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class, "requiredPackages", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class)); } /** * (experimental) A component to prepare the required runner user. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerImageComponent runnerUser() { return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class, "runnerUser", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class)); } /** * (experimental) Returns assets to copy into the built image. *

* Can be used to copy files into the image. *

* @param _os This parameter is required. * @param _architecture This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.util.List getAssets(final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.Os _os, final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.Architecture _architecture) { return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.call(this, "getAssets", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageAsset.class)), new Object[] { java.util.Objects.requireNonNull(_os, "_os is required"), java.util.Objects.requireNonNull(_architecture, "_architecture is required") })); } /** * (experimental) Returns commands to run to in built image. *

* Can be used to install packages, setup build prerequisites, etc. *

* @param _os This parameter is required. * @param _architecture This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public abstract @org.jetbrains.annotations.NotNull java.util.List getCommands(final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.Os _os, final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.Architecture _architecture); /** * (experimental) Returns Docker commands to run to in built image. *

* Can be used to add commands like VOLUME, ENTRYPOINT, CMD, etc. *

* Docker commands are added after assets and normal commands. *

* @param _os This parameter is required. * @param _architecture This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.util.List getDockerCommands(final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.Os _os, final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.Architecture _architecture) { return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.call(this, "getDockerCommands", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)), new Object[] { java.util.Objects.requireNonNull(_os, "_os is required"), java.util.Objects.requireNonNull(_architecture, "_architecture is required") })); } /** * (experimental) Returns true if the image builder should be rebooted after this component is installed. *

* @param _os This parameter is required. * @param _architecture This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.Boolean shouldReboot(final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.Os _os, final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.Architecture _architecture) { return software.amazon.jsii.Kernel.call(this, "shouldReboot", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(_os, "_os is required"), java.util.Objects.requireNonNull(_architecture, "_architecture is required") }); } /** * (experimental) Component name. *

* Used to identify component in image build logs, and for {@link IConfigurableRunnerImageBuilder.removeComponent } */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public abstract @org.jetbrains.annotations.NotNull java.lang.String getName(); /** * 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.RunnerImageComponent { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } /** * (experimental) Component name. *

* Used to identify component in image build logs, and for {@link IConfigurableRunnerImageBuilder.removeComponent } */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public final @org.jetbrains.annotations.NotNull java.lang.String getName() { return software.amazon.jsii.Kernel.get(this, "name", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) Returns commands to run to in built image. *

* Can be used to install packages, setup build prerequisites, etc. *

* @param _os This parameter is required. * @param _architecture This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public final @org.jetbrains.annotations.NotNull java.util.List getCommands(final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.Os _os, final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.Architecture _architecture) { return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.call(this, "getCommands", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)), new Object[] { java.util.Objects.requireNonNull(_os, "_os is required"), java.util.Objects.requireNonNull(_architecture, "_architecture is required") })); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy