From a99e9015b2308c99c6b68c3727f839aa039e4fe3 Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Thu, 15 Apr 2021 14:56:44 -0700 Subject: [PATCH] chore(codepipeline-actions): change the name of the ServiceCatalogDeployAction (#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* --- .../aws-codepipeline-actions/README.md | 24 +++++++------------ .../aws-codepipeline-actions/lib/index.ts | 2 +- ...eploy-action.ts => deploy-action-beta1.ts} | 16 ++++--------- .../aws-codepipeline-actions/package.json | 2 -- ...ervicecatalog-deploy-action-beta1.test.ts} | 6 ++--- 5 files changed, 16 insertions(+), 34 deletions(-) rename packages/@aws-cdk/aws-codepipeline-actions/lib/servicecatalog/{deploy-action.ts => deploy-action-beta1.ts} (85%) rename packages/@aws-cdk/aws-codepipeline-actions/test/servicecatalog/{servicecatalog-action.test.ts => servicecatalog-deploy-action-beta1.test.ts} (99%) diff --git a/packages/@aws-cdk/aws-codepipeline-actions/README.md b/packages/@aws-cdk/aws-codepipeline-actions/README.md index 7be56cd3c8017..89a94d4918697 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/README.md +++ b/packages/@aws-cdk/aws-codepipeline-actions/README.md @@ -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", }); ``` diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/index.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/index.ts index 2d6c46cd0db44..254b2764f2684 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/index.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/index.ts @@ -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'; diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/servicecatalog/deploy-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/servicecatalog/deploy-action-beta1.ts similarity index 85% rename from packages/@aws-cdk/aws-codepipeline-actions/lib/servicecatalog/deploy-action.ts rename to packages/@aws-cdk/aws-codepipeline-actions/lib/servicecatalog/deploy-action-beta1.ts index 9059af1ac0ba1..ada9bd3b65fbe 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/servicecatalog/deploy-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/servicecatalog/deploy-action-beta1.ts @@ -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. */ @@ -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', diff --git a/packages/@aws-cdk/aws-codepipeline-actions/package.json b/packages/@aws-cdk/aws-codepipeline-actions/package.json index 31b1d7248a4d6..990aae3431daa 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/package.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/package.json @@ -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", @@ -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", diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/servicecatalog/servicecatalog-action.test.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/servicecatalog/servicecatalog-deploy-action-beta1.test.ts similarity index 99% rename from packages/@aws-cdk/aws-codepipeline-actions/test/servicecatalog/servicecatalog-action.test.ts rename to packages/@aws-cdk/aws-codepipeline-actions/test/servicecatalog/servicecatalog-deploy-action-beta1.test.ts index 5a8555a627799..ef96441ca585e 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/servicecatalog/servicecatalog-action.test.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/servicecatalog/servicecatalog-deploy-action-beta1.test.ts @@ -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.', @@ -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', @@ -127,4 +127,4 @@ class TestFixture extends Stack { }); this.sourceStage.addAction(source); } -} \ No newline at end of file +}