@@ -77,6 +77,20 @@ export interface IStage {
7777 * Common properties shared by all Actions.
7878 */
7979export interface CommonActionProps {
80+ /**
81+ * The runOrder property for this Action.
82+ * RunOrder determines the relative order in which multiple Actions in the same Stage execute.
83+ *
84+ * @default 1
85+ * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
86+ */
87+ runOrder ?: number ;
88+ }
89+
90+ /**
91+ * Common properties shared by all Action Constructs.
92+ */
93+ export interface CommonActionConstructProps {
8094 /**
8195 * The Pipeline Stage to add this Action to.
8296 */
@@ -86,7 +100,7 @@ export interface CommonActionProps {
86100/**
87101 * Construction properties of the low-level {@link Action Action class}.
88102 */
89- export interface ActionProps extends CommonActionProps {
103+ export interface ActionProps extends CommonActionProps , CommonActionConstructProps {
90104 category : ActionCategory ;
91105 provider : string ;
92106 artifactBounds : ActionArtifactBounds ;
@@ -127,7 +141,7 @@ export abstract class Action extends cdk.Construct {
127141 *
128142 * https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#action-requirements
129143 */
130- public runOrder : number ;
144+ public readonly runOrder : number ;
131145
132146 public readonly owner : string ;
133147 public readonly version : string ;
@@ -148,7 +162,7 @@ export abstract class Action extends cdk.Construct {
148162 this . provider = props . provider ;
149163 this . configuration = props . configuration ;
150164 this . artifactBounds = props . artifactBounds ;
151- this . runOrder = 1 ;
165+ this . runOrder = props . runOrder === undefined ? 1 : props . runOrder ;
152166 this . stage = props . stage ;
153167
154168 this . stage . _attachAction ( this ) ;
0 commit comments