Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

fix: Use stage, region, resourceGroup and prefix from CLI options #284

Merged
merged 1 commit into from
Aug 29, 2019

Conversation

tbarlow12
Copy link
Contributor

@tbarlow12 tbarlow12 commented Aug 29, 2019

Fixes a regression in accepting region and stage options from CLI to form resource group name. Adds acceptance of prefix as well. Does so by configuring each of them in serverless.service (ServerlessAzureConfig) as one of the first steps of the BaseService constructor.

Also puts location into region inside the config if location is specified, but region is not.

Resolves #280, #282 and #281

Copy link
Contributor

@mydiemho mydiemho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

* Overwrite values for resourceGroup, prefix, region and stage
* in config if passed through CLI
*/
private setConfigFromCli() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great refactoring!

Copy link
Contributor

@wbreza wbreza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


const stageMap = {
"dogfood": "df",
"df": "df",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove df, dev,

@tbarlow12 tbarlow12 force-pushed the tabarlow/stage-name branch from de3b249 to b321dfa Compare August 29, 2019 18:53
@tbarlow12 tbarlow12 merged commit 506ebc6 into dev Aug 29, 2019
@tbarlow12 tbarlow12 deleted the tabarlow/stage-name branch August 29, 2019 19:38
tbarlow12 added a commit that referenced this pull request Aug 30, 2019
Fixes a regression in accepting `region` and `stage` options from CLI to form resource group name. Adds acceptance of `prefix` as well. Does so by configuring each of them in `serverless.service` (`ServerlessAzureConfig`) as one of the first steps of the `BaseService` constructor.

Also puts `location` into `region` inside the config if `location` is specified, but `region` is not.

Resolves #280, #282 and #281
tbarlow12 added a commit that referenced this pull request Sep 13, 2019
Fixes a regression in accepting `region` and `stage` options from CLI to form resource group name. Adds acceptance of `prefix` as well. Does so by configuring each of them in `serverless.service` (`ServerlessAzureConfig`) as one of the first steps of the `BaseService` constructor.

Also puts `location` into `region` inside the config if `location` is specified, but `region` is not.

Resolves #280, #282 and #281
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants