Skip to content

Commit

Permalink
chore(codepipeline-actions): change the name of the ServiceCatalogDep…
Browse files Browse the repository at this point in the history
…loyAction (#13780)

The `ServiceCatalogDeployAction` was an experimental Action in the codepipeline-actions module.
Stabilize it by renaming it `ServiceCatalogDeployActionBeta1`.
Also, remove the unused dependency between this module,
and service catalog module.

BREAKING CHANGE: the Action `ServiceCatalogDeployAction` has been renamed to `ServiceCatalogDeployActionBeta1`
* **codepipeline-actions**: the type `ServiceCatalogDeployActionProps` has been renamed to `ServiceCatalogDeployActionBeta1Props`


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
skinny85 authored Apr 15, 2021
1 parent 3d7f1d2 commit a99e901
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 34 deletions.
24 changes: 8 additions & 16 deletions packages/@aws-cdk/aws-codepipeline-actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -828,24 +828,16 @@ new codepipeline_actions.AlexaSkillDeployAction({

### AWS Service Catalog

You can deploy a CloudFormation template to an existing Service Catalog product with the following action:
You can deploy a CloudFormation template to an existing Service Catalog product with the following Action:

```ts
new codepipeline.Pipeline(this, 'Pipeline', {
stages: [
{
stageName: 'ServiceCatalogDeploy',
actions: [
new codepipeline_actions.ServiceCatalogDeployAction({
actionName: 'ServiceCatalogDeploy',
templatePath: cdkBuildOutput.atPath("Sample.template.json"),
productVersionName: "Version - " + Date.now.toString,
productType: "CLOUD_FORMATION_TEMPLATE",
productVersionDescription: "This is a version from the pipeline with a new description.",
productId: "prod-XXXXXXXX",
}),
},
],
const serviceCatalogDeployAction = new codepipeline_actions.ServiceCatalogDeployActionBeta1({
actionName: 'ServiceCatalogDeploy',
templatePath: cdkBuildOutput.atPath("Sample.template.json"),
productVersionName: "Version - " + Date.now.toString,
productType: "CLOUD_FORMATION_TEMPLATE",
productVersionDescription: "This is a version from the pipeline with a new description.",
productId: "prod-XXXXXXXX",
});
```

Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codepipeline-actions/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export * from './manual-approval-action';
export * from './s3/deploy-action';
export * from './s3/source-action';
export * from './stepfunctions/invoke-action';
export * from './servicecatalog/deploy-action';
export * from './servicecatalog/deploy-action-beta1';
export * from './action';
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ import { Action } from '../action';
import { Construct } from '@aws-cdk/core';

/**
* Construction properties of the {@link ServiceCatalogDeployAction ServiceCatalog deploy CodePipeline Action}.
*
* **Note**: this API is still experimental, and may have breaking changes in the future!
*
* @experimental
* Construction properties of the {@link ServiceCatalogDeployActionBeta1 ServiceCatalog deploy CodePipeline Action}.
*/
export interface ServiceCatalogDeployActionProps extends codepipeline.CommonAwsActionProps {
export interface ServiceCatalogDeployActionBeta1Props extends codepipeline.CommonAwsActionProps {
/**
* The path to the cloudformation artifact.
*/
Expand All @@ -39,19 +35,15 @@ export interface ServiceCatalogDeployActionProps extends codepipeline.CommonAwsA

/**
* CodePipeline action to connect to an existing ServiceCatalog product.
*
* **Note**: this class is still experimental, and may have breaking changes in the future!
*
* @experimental
*/
export class ServiceCatalogDeployAction extends Action {
export class ServiceCatalogDeployActionBeta1 extends Action {
private readonly templatePath: string;
private readonly productVersionName: string;
private readonly productVersionDescription?: string;
private readonly productId: string;
private readonly productType: string;

constructor(props: ServiceCatalogDeployActionProps) {
constructor(props: ServiceCatalogDeployActionBeta1Props) {
super({
...props,
provider: 'ServiceCatalog',
Expand Down
2 changes: 0 additions & 2 deletions packages/@aws-cdk/aws-codepipeline-actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
"@aws-cdk/aws-iam": "0.0.0",
"@aws-cdk/aws-lambda": "0.0.0",
"@aws-cdk/aws-s3": "0.0.0",
"@aws-cdk/aws-servicecatalog": "0.0.0",
"@aws-cdk/aws-sns": "0.0.0",
"@aws-cdk/aws-sns-subscriptions": "0.0.0",
"@aws-cdk/aws-stepfunctions": "0.0.0",
Expand All @@ -113,7 +112,6 @@
"@aws-cdk/aws-iam": "0.0.0",
"@aws-cdk/aws-lambda": "0.0.0",
"@aws-cdk/aws-s3": "0.0.0",
"@aws-cdk/aws-servicecatalog": "0.0.0",
"@aws-cdk/aws-sns": "0.0.0",
"@aws-cdk/aws-sns-subscriptions": "0.0.0",
"@aws-cdk/aws-stepfunctions": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ nodeunitShim({
// GIVEN
const stack = new TestFixture();
// WHEN
stack.deployStage.addAction(new cpactions.ServiceCatalogDeployAction({
stack.deployStage.addAction(new cpactions.ServiceCatalogDeployActionBeta1({
actionName: 'ServiceCatalogTest',
templatePath: stack.sourceOutput.atPath('template.yaml'),
productVersionDescription: 'This is a description of the version.',
Expand Down Expand Up @@ -58,7 +58,7 @@ nodeunitShim({
// GIVEN
const stack = new TestFixture();
// WHEN
stack.deployStage.addAction(new cpactions.ServiceCatalogDeployAction({
stack.deployStage.addAction(new cpactions.ServiceCatalogDeployActionBeta1({
actionName: 'ServiceCatalogTest',
templatePath: stack.sourceOutput.atPath('template.yaml'),
productVersionName: 'VersionName',
Expand Down Expand Up @@ -127,4 +127,4 @@ class TestFixture extends Stack {
});
this.sourceStage.addAction(source);
}
}
}

0 comments on commit a99e901

Please sign in to comment.