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

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

Go to download

CDK construct to create GitHub Actions self-hosted runners. Creates ephemeral runners on demand. Easy to deploy and highly customizable.

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

/**
 * (experimental) Components are a set of commands to run and optional files to add to an image.
 * 

* Components are the building blocks of images built by Image Builder. *

* Example: *

*

 * new ImageBuilderComponent(this, 'AWS CLI', {
 *    platform: 'Windows',
 *    displayName: 'AWS CLI',
 *    description: 'Install latest version of AWS CLI',
 *    commands: [
 *      '$ErrorActionPreference = \'Stop\'',
 *      'Start-Process msiexec.exe -Wait -ArgumentList \'/i https://awscli.amazonaws.com/AWSCLIV2.msi /qn\'',
 *    ],
 * }
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.73.0 (build 6faeda3)", date = "2023-01-17T21:04:03.039Z") @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.ImageBuilderComponent") public class ImageBuilderComponent extends software.amazon.awscdk.Resource { protected ImageBuilderComponent(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected ImageBuilderComponent(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param scope This parameter is required. * @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public ImageBuilderComponent(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.ImageBuilderComponentProperties 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"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * (experimental) Grants read permissions to the principal on the assets buckets. *

* @param grantee This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void grantAssetsRead(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IGrantable grantee) { software.amazon.jsii.Kernel.call(this, "grantAssetsRead", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(grantee, "grantee is required") }); } /** * @param type This parameter is required. * @param name This parameter is required. * @param data This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) protected @org.jetbrains.annotations.NotNull java.lang.String version(final @org.jetbrains.annotations.NotNull java.lang.String type, final @org.jetbrains.annotations.NotNull java.lang.String name, final @org.jetbrains.annotations.NotNull java.lang.Object data) { return software.amazon.jsii.Kernel.call(this, "version", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(type, "type is required"), java.util.Objects.requireNonNull(name, "name is required"), data }); } /** * (experimental) Component ARN. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getArn() { return software.amazon.jsii.Kernel.get(this, "arn", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) Supported platform for the component. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getPlatform() { return software.amazon.jsii.Kernel.get(this, "platform", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) A fluent builder for {@link com.cloudsnorkel.cdk.github.runners.ImageBuilderComponent}. */ @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 final com.cloudsnorkel.cdk.github.runners.ImageBuilderComponentProperties.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; this.props = new com.cloudsnorkel.cdk.github.runners.ImageBuilderComponentProperties.Builder(); } /** * (experimental) Shell commands to run when adding this component to the image. *

* On Linux, these are bash commands. On Windows, there are PowerShell commands. *

* @return {@code this} * @param commands Shell commands to run when adding this component to the image. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder commands(final java.util.List commands) { this.props.commands(commands); return this; } /** * (experimental) Component description. *

* @return {@code this} * @param description Component description. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder description(final java.lang.String description) { this.props.description(description); return this; } /** * (experimental) Component display name. *

* @return {@code this} * @param displayName Component display name. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder displayName(final java.lang.String displayName) { this.props.displayName(displayName); return this; } /** * (experimental) Component platform. *

* Must match the builder platform. *

* @return {@code this} * @param platform Component platform. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder platform(final java.lang.String platform) { this.props.platform(platform); return this; } /** * (experimental) Optional assets to add to the built image. *

* @return {@code this} * @param assets Optional assets to add to the built image. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder assets(final java.util.List assets) { this.props.assets(assets); return this; } /** * @returns a newly built instance of {@link com.cloudsnorkel.cdk.github.runners.ImageBuilderComponent}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public com.cloudsnorkel.cdk.github.runners.ImageBuilderComponent build() { return new com.cloudsnorkel.cdk.github.runners.ImageBuilderComponent( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy