A set of files traveling through the deployment pipeline.
Implements
Namespace: Amazon.CDK.Pipelines
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class FileSet : DeputyBase, IFileSetProducer
Syntax (vb)
Public Class FileSet Inherits DeputyBase Implements IFileSetProducer
Examples
class MyJenkinsStep : Step, ICodePipelineActionFactory
{
public MyJenkinsStep(JenkinsProvider provider, FileSet input) : base("MyJenkinsStep")
{
// This is necessary if your step accepts parameters, like environment variables,
// that may contain outputs from other steps. It doesn't matter what the
// structure is, as long as it contains the values that may contain outputs.
DiscoverReferencedOutputs(new Dictionary<string, IDictionary<string, object>> {
{ "env", new Struct { } }
});
}
public CodePipelineActionFactoryResult ProduceAction(IStage stage, ProduceActionOptions options)
{
// This is where you control what type of Action gets added to the
// CodePipeline
stage.AddAction(
new JenkinsAction(new JenkinsActionProps {
// Copy 'actionName' and 'runOrder' from the options
ActionName = options.ActionName,
RunOrder = options.RunOrder,
// Jenkins-specific configuration
Type = JenkinsActionType.TEST,
JenkinsProvider = Provider,
ProjectName = "MyJenkinsProject",
// Translate the FileSet into a codepipeline.Artifact
Inputs = new [] { options.Artifacts.ToCodePipeline(Input) }
}));
return new CodePipelineActionFactoryResult { RunOrdersConsumed = 1 };
}
}
Synopsis
Constructors
Properties
| Id | Human-readable descriptor for this file set (does not need to be unique). |
| PrimaryOutput | The primary output of a file set producer. |
| Producer | The Step that produces this FileSet. |
Methods
Constructors
FileSet(string, Step?)
A set of files traveling through the deployment pipeline.
public FileSet(string id, Step? producer = null)
Parameters
Properties
Id
Human-readable descriptor for this file set (does not need to be unique).
public virtual string Id { get; }
Property Value
PrimaryOutput
The primary output of a file set producer.
public virtual FileSet? PrimaryOutput { get; }
Property Value
Producer
Methods
ProducedBy(Step?)
Mark the given Step as the producer for this FileSet.
public virtual void ProducedBy(Step? producer = null)
Parameters
- producer Step