Class ConnectionSourceOptions
Configuration options for CodeStar source.
Inheritance
Implements
Namespace: Amazon.CDK.Pipelines
Assembly: Amazon.CDK.Pipelines.dll
Syntax (csharp)
public class ConnectionSourceOptions : Object, IConnectionSourceOptions
Syntax (vb)
Public Class ConnectionSourceOptions
Inherits Object
Implements IConnectionSourceOptions
Remarks
ExampleMetadata: infused
Examples
var pipeline = new CodePipeline(this, "Pipeline", new CodePipelineProps {
Synth = new ShellStep("Synth", new ShellStepProps {
Input = CodePipelineSource.Connection("my-org/my-app", "main", new ConnectionSourceOptions {
ConnectionArn = "arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41"
}),
Commands = new [] { "npm ci", "npm run build", "npx cdk synth" }
}),
// Turn this on because the pipeline uses Docker image assets
DockerEnabledForSelfMutation = true
});
pipeline.AddWave("MyWave", new WaveOptions {
Post = new [] {
new CodeBuildStep("RunApproval", new CodeBuildStepProps {
Commands = new [] { "command-from-image" },
BuildEnvironment = new BuildEnvironment {
// The user of a Docker image asset in the pipeline requires turning on
// 'dockerEnabledForSelfMutation'.
BuildImage = LinuxBuildImage.FromAsset(this, "Image", new DockerImageAssetProps {
Directory = "./docker-image"
})
}
}) }
});
Synopsis
Constructors
ConnectionSourceOptions() |
Properties
CodeBuildCloneOutput | If this is set, the next CodeBuild job clones the repository (instead of CodePipeline downloading the files). |
ConnectionArn | The ARN of the CodeStar Connection created in the AWS console that has permissions to access this GitHub or BitBucket repository. |
TriggerOnPush | Controls automatically starting your pipeline when a new commit is made on the configured repository and branch. |
Constructors
ConnectionSourceOptions()
public ConnectionSourceOptions()
Properties
CodeBuildCloneOutput
If this is set, the next CodeBuild job clones the repository (instead of CodePipeline downloading the files).
public Nullable<bool> CodeBuildCloneOutput { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
This provides access to repository history, and retains symlinks (symlinks would otherwise be removed by CodePipeline).
Note: if this option is true, only CodeBuild jobs can use the output artifact.
Default: false
ConnectionArn
The ARN of the CodeStar Connection created in the AWS console that has permissions to access this GitHub or BitBucket repository.
public string ConnectionArn { get; set; }
Property Value
System.String
Remarks
Examples
"arn:aws:codestar-connections:us-east-1:123456789012:connection/12345678-abcd-12ab-34cdef5678gh";
TriggerOnPush
Controls automatically starting your pipeline when a new commit is made on the configured repository and branch.
public Nullable<bool> TriggerOnPush { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
If unspecified, the default value is true, and the field does not display by default.
Default: true