Skip to content

Commit

Permalink
AT-9828: small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
rddimon committed Jun 30, 2023
1 parent 90a5d4f commit c7c0809
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [7.1.0] - 2023-06-21
## [7.1.0] - 2023-06-30

### Added
- Support for the custom stages.
Expand Down
1 change: 1 addition & 0 deletions src/aws/cloud-formation-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class CloudFormationWrapper {
public stackName: string;

constructor(credentials?: any) {
// for the CloudFormation stack we should use the `base` stage not the plugin custom stage
const defaultStackName = Globals.serverless.service.service + "-" + Globals.getBaseStage();
this.stackName = Globals.serverless.service.provider.stackName || defaultStackName;
this.cloudFormation = new CloudFormationClient({
Expand Down
2 changes: 0 additions & 2 deletions src/models/domain-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import Logging from "../logging";
class DomainConfig {
public givenDomainName: string;
public basePath: string | undefined;
public baseStage: string | undefined;
public stage: string | undefined;
public certificateName: string | undefined;
public certificateArn: string | undefined;
Expand Down Expand Up @@ -55,7 +54,6 @@ class DomainConfig {
this.autoDomainWaitFor = config.autoDomainWaitFor;
this.preserveExternalPathMappings = evaluateBoolean(config.preserveExternalPathMappings, false);
this.basePath = this._getBasePath(config.basePath);
this.baseStage = Globals.getBaseStage();
this.stage = config.stage || Globals.getBaseStage();
this.endpointType = this._getEndpointType(config.endpointType);
this.apiType = this._getApiType(config.apiType);
Expand Down
17 changes: 12 additions & 5 deletions test/integration-tests/debug/pr-example/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@ plugins:

custom:
customDomain:
autoDomain: true
basePath: ""
domainName: ${env:PLUGIN_IDENTIFIER}-http-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
stage: "dev"
createRoute53Record: true
- rest:
autoDomain: true
basePath: "v1"
domainName: ${env:PLUGIN_IDENTIFIER}-http-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
stage: "dev"
createRoute53Record: true
- rest:
autoDomain: true
basePath: "v2"
domainName: ${env:PLUGIN_IDENTIFIER}-http-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
stage: "dev"
createRoute53Record: true

package:
patterns:
Expand Down

0 comments on commit c7c0809

Please sign in to comment.