Skip to content

Commit

Permalink
fix(codepipeline): Service Catalog action generated incorrect file pa…
Browse files Browse the repository at this point in the history
…th (#9773)

Artifact path was incorrectly set to use the artifact location instead of the filename.

Fixes #9767

---

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
paveljos committed Aug 18, 2020
1 parent d3813e7 commit 286ff50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
Expand Up @@ -3,15 +3,6 @@ import * as iam from '@aws-cdk/aws-iam';
import { Construct } from '@aws-cdk/core';
import { Action } from '../action';

/** TODO:
* 1.) Support cross account deployments
* 2.) Fix least privilege
* 3.) Handle CREATION of a new product
* 4.) Handle MAINTENANCE of a provisioned product
* 5.) Test/support product types beyond CLOUD_FORMATION_TEMPLATE
* 6.) Valid test cases!
*/

/**
* Construction properties of the {@link ServiceCatalogDeployAction ServiceCatalog deploy CodePipeline Action}.
*
Expand Down Expand Up @@ -69,7 +60,7 @@ export class ServiceCatalogDeployAction extends Action {
},
inputs: [props.templatePath.artifact],
});
this.templatePath = props.templatePath.location;
this.templatePath = props.templatePath.fileName;
this.productVersionName = props.productVersionName;
this.productVersionDescription = props.productVersionDescription;
this.productId = props.productId;
Expand Down
Expand Up @@ -8,7 +8,7 @@ import * as cpactions from '../../lib';
/* eslint-disable quote-props */

export = {
'addAction succesfully leads to creation of codepipeline service catalog action'(test: Test) {
'addAction succesfully leads to creation of codepipeline service catalog action with properly formatted TemplateFilePath'(test: Test) {
// GIVEN
const stack = new TestFixture();
// WHEN
Expand All @@ -34,7 +34,7 @@ export = {
'Version': '1',
},
'Configuration': {
'TemplateFilePath': 'SourceArtifact::template.yaml',
'TemplateFilePath': 'template.yaml',
'ProductVersionDescription': 'This is a description of the version.',
'ProductVersionName': 'VersionName',
'ProductType': 'CLOUD_FORMATION_TEMPLATE',
Expand Down Expand Up @@ -79,7 +79,7 @@ export = {
'Version': '1',
},
'Configuration': {
'TemplateFilePath': 'SourceArtifact::template.yaml',
'TemplateFilePath': 'template.yaml',
'ProductVersionName': 'VersionName',
'ProductType': 'CLOUD_FORMATION_TEMPLATE',
'ProductId': 'prod-xxxxxxxxx',
Expand Down

0 comments on commit 286ff50

Please sign in to comment.