class CodePipelineFileSet
Language | Type name |
---|---|
![]() | Amazon.CDK.Pipelines.CodePipelineFileSet |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/pipelines#CodePipelineFileSet |
![]() | software.amazon.awscdk.pipelines.CodePipelineFileSet |
![]() | aws_cdk.pipelines.CodePipelineFileSet |
![]() | aws-cdk-lib » pipelines » CodePipelineFileSet |
Implements
IFile
Extends
File
A FileSet created from a CodePipeline artifact.
You only need to use this if you want to add CDK Pipeline stages add the end of an existing CodePipeline, which should be very rare.
Example
declare const codePipeline: codepipeline.Pipeline;
const sourceArtifact = new codepipeline.Artifact('MySourceArtifact');
const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
codePipeline: codePipeline,
synth: new pipelines.ShellStep('Synth', {
input: pipelines.CodePipelineFileSet.fromArtifact(sourceArtifact),
commands: ['npm ci', 'npm run build', 'npx cdk synth'],
}),
});
Properties
Name | Type | Description |
---|---|---|
id | string | Human-readable descriptor for this file set (does not need to be unique). |
producer | Step | The Step that produces this FileSet. |
primary | File | The primary output of a file set producer. |
id
Type:
string
Human-readable descriptor for this file set (does not need to be unique).
producer
Type:
Step
The Step that produces this FileSet.
primaryOutput?
Type:
File
(optional)
The primary output of a file set producer.
The primary output of a FileSet is itself.
Methods
Name | Description |
---|---|
produced | Mark the given Step as the producer for this FileSet. |
to | Return a string representation of this FileSet. |
static from | Turn a CodePipeline Artifact into a FileSet. |
producedBy(producer?)
public producedBy(producer?: Step): void
Parameters
- producer
Step
Mark the given Step as the producer for this FileSet.
This method can only be called once.
toString()
public toString(): string
Returns
string
Return a string representation of this FileSet.
static fromArtifact(artifact)
public static fromArtifact(artifact: Artifact): CodePipelineFileSet
Parameters
- artifact
Artifact
Returns
Turn a CodePipeline Artifact into a FileSet.