CodePipelineFileSet

class aws_cdk.pipelines.CodePipelineFileSet(id, producer=None)

Bases: FileSet

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.

ExampleMetadata:

infused

Example:

# code_pipeline: codepipeline.Pipeline


source_artifact = codepipeline.Artifact("MySourceArtifact")

pipeline = pipelines.CodePipeline(self, "Pipeline",
    code_pipeline=code_pipeline,
    synth=pipelines.ShellStep("Synth",
        input=pipelines.CodePipelineFileSet.from_artifact(source_artifact),
        commands=["npm ci", "npm run build", "npx cdk synth"]
    )
)
Parameters:
  • id (str) – Human-readable descriptor for this file set (does not need to be unique).

  • producer (Optional[Step]) –

Methods

produced_by(producer=None)

Mark the given Step as the producer for this FileSet.

This method can only be called once.

Parameters:

producer (Optional[Step]) –

Return type:

None

to_string()

Return a string representation of this FileSet.

Return type:

str

Attributes

id

Human-readable descriptor for this file set (does not need to be unique).

primary_output

The primary output of a file set producer.

The primary output of a FileSet is itself.

producer

The Step that produces this FileSet.

Static Methods

classmethod from_artifact(artifact)

Turn a CodePipeline Artifact into a FileSet.

Parameters:

artifact (Artifact) –

Return type:

CodePipelineFileSet