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

com.cloudsnorkel.cdk.github.runners.RunnerRuntimeParameters 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) Workflow job parameters as parsed from the webhook event. Pass these into your runner executor and run something like:.
 * 

*

 * ./config.sh --unattended --url "https://${GITHUB_DOMAIN}/${OWNER}/${REPO}" --token "${RUNNER_TOKEN}" --ephemeral --work _work --labels "${RUNNER_LABEL}" --name "${RUNNER_NAME}" --disableupdate
 * 
*

* All parameters are specified as step function paths and therefore must be used only in step function task parameters. */ @javax.annotation.Generated(value = "jsii-pacmak/1.73.0 (build 6faeda3)", date = "2023-01-17T21:04:03.063Z") @software.amazon.jsii.Jsii(module = com.cloudsnorkel.cdk.github.runners.$Module.class, fqn = "@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters") @software.amazon.jsii.Jsii.Proxy(RunnerRuntimeParameters.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public interface RunnerRuntimeParameters extends software.amazon.jsii.JsiiSerializable { /** * (experimental) Path to GitHub domain. *

* Most of the time this will be github.com but for self-hosted GitHub instances, this will be different. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getGithubDomainPath(); /** * (experimental) Path to repostiroy owner name. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getOwnerPath(); /** * (experimental) Path to repository name. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getRepoPath(); /** * (experimental) Path to desired runner name. *

* We specifically set the name to make troubleshooting easier. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getRunnerNamePath(); /** * (experimental) Path to runner token used to register token. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getRunnerTokenPath(); /** * @return a {@link Builder} of {@link RunnerRuntimeParameters} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link RunnerRuntimeParameters} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.lang.String githubDomainPath; java.lang.String ownerPath; java.lang.String repoPath; java.lang.String runnerNamePath; java.lang.String runnerTokenPath; /** * Sets the value of {@link RunnerRuntimeParameters#getGithubDomainPath} * @param githubDomainPath Path to GitHub domain. This parameter is required. * Most of the time this will be github.com but for self-hosted GitHub instances, this will be different. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder githubDomainPath(java.lang.String githubDomainPath) { this.githubDomainPath = githubDomainPath; return this; } /** * Sets the value of {@link RunnerRuntimeParameters#getOwnerPath} * @param ownerPath Path to repostiroy owner name. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder ownerPath(java.lang.String ownerPath) { this.ownerPath = ownerPath; return this; } /** * Sets the value of {@link RunnerRuntimeParameters#getRepoPath} * @param repoPath Path to repository name. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder repoPath(java.lang.String repoPath) { this.repoPath = repoPath; return this; } /** * Sets the value of {@link RunnerRuntimeParameters#getRunnerNamePath} * @param runnerNamePath Path to desired runner name. This parameter is required. * We specifically set the name to make troubleshooting easier. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder runnerNamePath(java.lang.String runnerNamePath) { this.runnerNamePath = runnerNamePath; return this; } /** * Sets the value of {@link RunnerRuntimeParameters#getRunnerTokenPath} * @param runnerTokenPath Path to runner token used to register token. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder runnerTokenPath(java.lang.String runnerTokenPath) { this.runnerTokenPath = runnerTokenPath; return this; } /** * Builds the configured instance. * @return a new instance of {@link RunnerRuntimeParameters} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public RunnerRuntimeParameters build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link RunnerRuntimeParameters} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements RunnerRuntimeParameters { private final java.lang.String githubDomainPath; private final java.lang.String ownerPath; private final java.lang.String repoPath; private final java.lang.String runnerNamePath; private final java.lang.String runnerTokenPath; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.githubDomainPath = software.amazon.jsii.Kernel.get(this, "githubDomainPath", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.ownerPath = software.amazon.jsii.Kernel.get(this, "ownerPath", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.repoPath = software.amazon.jsii.Kernel.get(this, "repoPath", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.runnerNamePath = software.amazon.jsii.Kernel.get(this, "runnerNamePath", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.runnerTokenPath = software.amazon.jsii.Kernel.get(this, "runnerTokenPath", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.githubDomainPath = java.util.Objects.requireNonNull(builder.githubDomainPath, "githubDomainPath is required"); this.ownerPath = java.util.Objects.requireNonNull(builder.ownerPath, "ownerPath is required"); this.repoPath = java.util.Objects.requireNonNull(builder.repoPath, "repoPath is required"); this.runnerNamePath = java.util.Objects.requireNonNull(builder.runnerNamePath, "runnerNamePath is required"); this.runnerTokenPath = java.util.Objects.requireNonNull(builder.runnerTokenPath, "runnerTokenPath is required"); } @Override public final java.lang.String getGithubDomainPath() { return this.githubDomainPath; } @Override public final java.lang.String getOwnerPath() { return this.ownerPath; } @Override public final java.lang.String getRepoPath() { return this.repoPath; } @Override public final java.lang.String getRunnerNamePath() { return this.runnerNamePath; } @Override public final java.lang.String getRunnerTokenPath() { return this.runnerTokenPath; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("githubDomainPath", om.valueToTree(this.getGithubDomainPath())); data.set("ownerPath", om.valueToTree(this.getOwnerPath())); data.set("repoPath", om.valueToTree(this.getRepoPath())); data.set("runnerNamePath", om.valueToTree(this.getRunnerNamePath())); data.set("runnerTokenPath", om.valueToTree(this.getRunnerTokenPath())); final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RunnerRuntimeParameters.Jsii$Proxy that = (RunnerRuntimeParameters.Jsii$Proxy) o; if (!githubDomainPath.equals(that.githubDomainPath)) return false; if (!ownerPath.equals(that.ownerPath)) return false; if (!repoPath.equals(that.repoPath)) return false; if (!runnerNamePath.equals(that.runnerNamePath)) return false; return this.runnerTokenPath.equals(that.runnerTokenPath); } @Override public final int hashCode() { int result = this.githubDomainPath.hashCode(); result = 31 * result + (this.ownerPath.hashCode()); result = 31 * result + (this.repoPath.hashCode()); result = 31 * result + (this.runnerNamePath.hashCode()); result = 31 * result + (this.runnerTokenPath.hashCode()); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy