Skip to content

Secrets Construct ​

Secrets required for GitHub runners operation.

Initializer ​

ts
import { Secrets } from '@cloudsnorkel/cdk-github-runners'

new Secrets(scope: Construct, id: string)
python
import cloudsnorkel.cdk_github_runners

cloudsnorkel.cdk_github_runners.Secrets(
  scope: Construct,
  id: str
)
java
import com.cloudsnorkel.cdk.github.runners.Secrets;

new Secrets(Construct scope, java.lang.String id);
csharp
using CloudSnorkel;

new Secrets(Construct Scope, string Id);
go
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"

cloudsnorkelcdkgithubrunners.NewSecrets(scope Construct, id *string) Secrets

Methods ​

toString()to_string()toString()ToString()ToString() ​

Returns a string representation of this construct.

ts
public toString(): string
python
def to_string() -> str
java
public java.lang.String toString()
csharp
private string ToString()
go
func ToString() *string

with()with()with()With()With() ​

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

ts
public with(mixins: ...IMixin[]): IConstruct
  • mixins: ...IMixin[]

    The mixins to apply.

python
def with(
  mixins: *IMixin
) -> IConstruct
  • mixins: *IMixin

    The mixins to apply.

java
public IConstruct with(IMixin... mixins)
  • mixins: IMixin...

    The mixins to apply.

csharp
private IConstruct With(params IMixin[] Mixins)
  • Mixins: params IMixin[]

    The mixins to apply.

go
func With(mixins ...IMixin) IConstruct
  • mixins: ...IMixin

    The mixins to apply.

Static Functions ​

isConstruct()is_construct()isConstruct()IsConstruct()IsConstruct() ​

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

ts
import { Secrets } from '@cloudsnorkel/cdk-github-runners'

Secrets.isConstruct(x: any)
  • x: any

    Any object.

python
import cloudsnorkel.cdk_github_runners

cloudsnorkel.cdk_github_runners.Secrets.is_construct(
  x: typing.Any
)
  • x: typing.Any

    Any object.

java
import com.cloudsnorkel.cdk.github.runners.Secrets;

Secrets.isConstruct(java.lang.Object x)
  • x: java.lang.Object

    Any object.

csharp
using CloudSnorkel;

Secrets.IsConstruct(object X);
  • X: object

    Any object.

go
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"

cloudsnorkelcdkgithubrunners.Secrets_IsConstruct(x interface{}) *bool
  • x: interface{}

    Any object.

Properties ​

nodenodenodeNodeNode ​

node: Node

node: Node

node: Node

Node: Node

Node: Node

The tree node.

githubgithubgithubGithubGithub ​

github: Secret

github: Secret

github: Secret

Github: Secret

Github: Secret

Authentication secret for GitHub containing either app details or personal access token.

This secret is used to register runners and cancel jobs when the runner fails to start.

This secret is meant to be edited by the user after being created.

githubPrivateKeygithub_private_keygithubPrivateKeyGithubPrivateKeyGithubPrivateKey ​

githubPrivateKey: Secret

github_private_key: Secret

githubPrivateKey: Secret

GithubPrivateKey: Secret

GithubPrivateKey: Secret

GitHub app private key. Not needed when using personal access tokens.

This secret is meant to be edited by the user after being created. It is separate than the main GitHub secret because inserting private keys into JSON is hard.

setupsetupsetupSetupSetup ​

setup: Secret

setup: Secret

setup: Secret

Setup: Secret

Setup: Secret

Setup secret used to authenticate user for our setup wizard.

Should be empty after setup has been completed.

webhookwebhookwebhookWebhookWebhook ​

webhook: Secret

webhook: Secret

webhook: Secret

Webhook: Secret

Webhook: Secret

Webhook secret used to confirm events are coming from GitHub and nowhere else.

Released under the Apache-2.0 License.