Skip to content
v2.275.0

CodePipelineFileSet Class ​

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 ​

ts
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 ​

idstringidstridStringIdstringId*string#
Human-readable descriptor for this file set (does not need to be unique).
primaryOutputmay be undefinedFileSetprimary_outputmay be undefinedFileSetprimaryOutputmay be undefinedFileSetPrimaryOutputmay be undefinedFileSetPrimaryOutputmay be undefinedFileSet#
The primary output of a file set producer.

The primary output of a FileSet is itself.

producerStepproducerStepproducerStepProducerStepProducerStep#
The Step that produces this FileSet.

Methods ​

fromArtifact(artifact: Artifact): CodePipelineFileSet // chainable@staticmethod def from_artifact(artifact: Artifact) -> CodePipelineFileSetpublic static CodePipelineFileSet fromArtifact(Artifact artifact)public static CodePipelineFileSet FromArtifact(Artifact artifact)func FromArtifact(Artifact Artifact) CodePipelineFileSetstatic#
Turn a CodePipeline Artifact into a FileSet.
producedBy(producer?: Step): voiddef produced_by(self, producer: typing.Optional[Step] = None) -> Nonepublic void producedBy(Step producer)public void ProducedBy(Step? producer = null)func ProducedBy(Producer Step)#
Mark the given Step as the producer for this FileSet.

This method can only be called once.

toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Return a string representation of this FileSet.