Skip to content
v2.274.0

CodeStarConnectionsSourceActionProps Struct ​

Construction properties for CodeStarConnectionsSourceAction.

Example ​

ts
declare const project: codebuild.Project;

const sourceOutput = new codepipeline.Artifact();
const sourceAction = new codepipeline_actions.CodeStarConnectionsSourceAction({
  actionName: 'BitBucket_Source',
  owner: 'aws',
  repo: 'aws-cdk',
  output: sourceOutput,
  connectionArn: 'arn:aws:codestar-connections:us-east-1:123456789012:connection/12345678-abcd-12ab-34cdef5678gh',
  variablesNamespace: 'SomeSpace', // optional - by default, a name will be generated for you
});

// later:

new codepipeline_actions.CodeBuildAction({
  actionName: 'CodeBuild',
  project,
  input: sourceOutput,
  environmentVariables: {
    COMMIT_ID: {
      value: sourceAction.variables.commitId,
    },
  },
});

Properties ​

actionNamestringaction_namestractionNameStringActionNamestringActionName*stringrequired#
The physical, human-readable name of the Action.

Note that Action names must be unique within a single Stage.

branchoptionalstringbranchoptionalstrbranchoptionalStringBranchoptionalstringBranchoptional*string= 'master'#
The branch to build.
codeBuildCloneOutputoptionalbooleancode_build_clone_outputoptionalboolcodeBuildCloneOutputoptionalBooleanCodeBuildCloneOutputoptionalboolCodeBuildCloneOutputoptional*bool= false#
Whether the output should be the contents of the repository (which is the default), or a link that allows CodeBuild to clone the repository before building.

Note: if this option is true, then only CodeBuild actions can use the resulting output.

connectionArnstringconnection_arnstrconnectionArnStringConnectionArnstringConnectionArn*stringrequired#
The ARN of the CodeStar Connection created in the AWS console that has permissions to access this GitHub or BitBucket repository.
example
ts
'arn:aws:codestar-connections:us-east-1:123456789012:connection/12345678-abcd-12ab-34cdef5678gh'
outputArtifactoutputArtifactoutputArtifactOutputArtifactOutputArtifactrequired#
The output artifact that this action produces.

Can be used as input for further pipeline actions.

ownerstringownerstrownerStringOwnerstringOwner*stringrequired#
The owning user or organization of the repository.
example
ts
'aws'
repostringrepostrrepoStringRepostringRepo*stringrequired#
The name of the repository.
example
ts
'aws-cdk'
roleoptionalIRoleroleoptionalIRoleroleoptionalIRoleRoleoptionalIRoleRoleoptionalIRole#
The Role in which context's this Action will be executing in.

Default: a new Role will be generated

notes

The Pipeline's Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your IAction.bind method in the ActionBindOptions.role property.

runOrderoptionalnumberrun_orderoptionalint | floatrunOrderoptionalNumberRunOrderoptionaldoubleRunOrderoptional*float64= 1#
The runOrder property for this Action.

RunOrder determines the relative order in which multiple Actions in the same Stage execute.

triggerOnPushoptionalbooleantrigger_on_pushoptionalbooltriggerOnPushoptionalBooleanTriggerOnPushoptionalboolTriggerOnPushoptional*bool= true#
Controls automatically starting your pipeline when a new commit is made on the configured repository and branch.

If unspecified, the default value is true, and the field does not display by default.

variablesNamespaceoptionalstringvariables_namespaceoptionalstrvariablesNamespaceoptionalStringVariablesNamespaceoptionalstringVariablesNamespaceoptional*string#
The name of the namespace to use for variables emitted by this action.

Default: a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set