Skip to content
v2.274.0

CodeCommitSourceOptions Struct ​

Configuration options for a CodeCommit source.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codepipeline_actions as codepipeline_actions } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { pipelines } from 'aws-cdk-lib';

declare const role: iam.Role;
const codeCommitSourceOptions: pipelines.CodeCommitSourceOptions = {
  actionName: 'actionName',
  codeBuildCloneOutput: false,
  eventRole: role,
  trigger: codepipeline_actions.CodeCommitTrigger.NONE,
};

Properties ​

actionNameoptionalstringaction_nameoptionalstractionNameoptionalStringActionNameoptionalstringActionNameoptional*string#
The action name used for this source in the CodePipeline.

Default: The repository name

codeBuildCloneOutputoptionalbooleancode_build_clone_outputoptionalboolcodeBuildCloneOutputoptionalBooleanCodeBuildCloneOutputoptionalboolCodeBuildCloneOutputoptional*bool= false#
If this is set, the next CodeBuild job clones the repository (instead of CodePipeline downloading the files).

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.

eventRoleoptionalIRoleevent_roleoptionalIRoleeventRoleoptionalIRoleEventRoleoptionalIRoleEventRoleoptionalIRole#
Role to be used by on commit event rule.

Default: a new role will be created.

Used only when trigger value is CodeCommitTrigger.EVENTS.

triggeroptionalCodeCommitTriggertriggeroptionalCodeCommitTriggertriggeroptionalCodeCommitTriggerTriggeroptionalCodeCommitTriggerTriggeroptionalCodeCommitTrigger= CodeCommitTrigger.EVENTS#
How should CodePipeline detect source changes for this Action.