@@ -77,6 +77,20 @@ export interface IStage {
77
77
* Common properties shared by all Actions.
78
78
*/
79
79
export 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 {
80
94
/**
81
95
* The Pipeline Stage to add this Action to.
82
96
*/
@@ -86,7 +100,7 @@ export interface CommonActionProps {
86
100
/**
87
101
* Construction properties of the low-level {@link Action Action class}.
88
102
*/
89
- export interface ActionProps extends CommonActionProps {
103
+ export interface ActionProps extends CommonActionProps , CommonActionConstructProps {
90
104
category : ActionCategory ;
91
105
provider : string ;
92
106
artifactBounds : ActionArtifactBounds ;
@@ -127,7 +141,7 @@ export abstract class Action extends cdk.Construct {
127
141
*
128
142
* https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#action-requirements
129
143
*/
130
- public runOrder : number ;
144
+ public readonly runOrder : number ;
131
145
132
146
public readonly owner : string ;
133
147
public readonly version : string ;
@@ -148,7 +162,7 @@ export abstract class Action extends cdk.Construct {
148
162
this . provider = props . provider ;
149
163
this . configuration = props . configuration ;
150
164
this . artifactBounds = props . artifactBounds ;
151
- this . runOrder = 1 ;
165
+ this . runOrder = props . runOrder === undefined ? 1 : props . runOrder ;
152
166
this . stage = props . stage ;
153
167
154
168
this . stage . _attachAction ( this ) ;
0 commit comments