-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cloudformation): allow specifying additional inputs for deploy Actions #2020
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f7a309f
Make Action#addInputArtifact idempotent.
skinny85 164e0a1
Validate that Action input Artifacts have unique names.
skinny85 7e9fbd4
Remove the no longer required check for Artifact name uniqueness.
skinny85 5008182
Add the additionalInputArtifacts property when creating CloudFormatio…
skinny85 4c18d0b
Make Action#addOutputArtifact idempotent.
skinny85 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,6 +200,23 @@ export interface PipelineCloudFormationDeployActionProps extends PipelineCloudFo | |
* @default No overrides | ||
*/ | ||
parameterOverrides?: { [name: string]: any }; | ||
|
||
/** | ||
* The list of additional input Artifacts for this Action. | ||
* This is especially useful when used in conjunction with the `parameterOverrides` property. | ||
* For example, if you have: | ||
* | ||
* parameterOverrides: { | ||
* 'Param1': action1.outputArtifact.bucketName, | ||
* 'Param2': action2.outputArtifact.objectKey, | ||
* } | ||
* | ||
* , if the output Artifacts of `action1` and `action2` were not used to | ||
* set either the `templateConfiguration` or the `templatePath` properties, | ||
* you need to make sure to include them in the `additionalInputArtifacts` - | ||
* otherwise, you'll get an "unrecognized Artifact" error during your Pipeline's execution. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mention that artifacts can also be added using |
||
*/ | ||
additionalInputArtifacts?: codepipeline.Artifact[]; | ||
} | ||
// tslint:enable:max-line-length | ||
|
||
|
@@ -223,6 +240,10 @@ export abstract class PipelineCloudFormationDeployAction extends PipelineCloudFo | |
}); | ||
|
||
this.props = props; | ||
|
||
for (const inputArtifact of props.additionalInputArtifacts || []) { | ||
this.addInputArtifact(inputArtifact); | ||
} | ||
} | ||
|
||
/** | ||
|
@@ -293,8 +314,7 @@ export class PipelineCreateReplaceChangeSetAction extends PipelineCloudFormation | |
}); | ||
|
||
this.addInputArtifact(props.templatePath.artifact); | ||
if (props.templateConfiguration && | ||
props.templateConfiguration.artifact.artifactName !== props.templatePath.artifact.artifactName) { | ||
if (props.templateConfiguration) { | ||
this.addInputArtifact(props.templateConfiguration.artifact); | ||
} | ||
|
||
|
@@ -357,8 +377,7 @@ export class PipelineCreateUpdateStackAction extends PipelineCloudFormationDeplo | |
}); | ||
|
||
this.addInputArtifact(props.templatePath.artifact); | ||
if (props.templateConfiguration && | ||
props.templateConfiguration.artifact.artifactName !== props.templatePath.artifact.artifactName) { | ||
if (props.templateConfiguration) { | ||
this.addInputArtifact(props.templateConfiguration.artifact); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comma at the beginning of the sentence?