You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CDTOOL-1243] Support for --no-default-domain flag for Compute Deploy & Publish (#1610)
### Change summary
This PR adds support for a `--no-default-domain` flag for the Compute
Deploy & Publish commands, allowing users to opt out of the automatic
allocation of a domain when one isn't specified.
All Submissions:
* [x] Have you followed the guidelines in our Contributing document?
* [x] Have you checked to ensure there aren't other open [Pull
Requests](https://github.com/fastly/cli/pulls) for the same
update/change?
<!-- You can erase any parts of this template not applicable to your
Pull Request. -->
### New Feature Submissions:
* [x] Does your submission pass tests?
```
TEST_COMPUTE_DEPLOY=1 go test -v ./pkg/commands/compute -run "TestDeploy/success_with_--no-default-domain_flag_for_new_service"
...
--- PASS: TestDeploy (0.70s)
--- PASS: TestDeploy/success_with_--no-default-domain_flag_for_new_service (0.68s)
TEST_COMPUTE_DEPLOY=1 go test -v ./pkg/commands/compute -run "TestDeploy/success with --no-default-domain but explicit --domain provided"
...
--- PASS: TestDeploy (0.10s)
--- PASS: TestDeploy/success_with_--no-default-domain_but_explicit_--domain_provided (0.08s)
```
### Changes to Core Features:
* [x] Have you written new tests for your core changes, as applicable?
* [x] Have you successfully run tests with your changes locally?
### User Impact
Users can now opt out of the automatic allocation of a domain when one
isn't specified when deploying a new Compute service.
### Additional Notes
Local testing confirms this new flag is working as expected.
- feat(commands/ngwaf/rules): add support for CRUD operations for NGWAF rules ([#1578](https://github.com/fastly/cli/pull/1605))
11
+
- feat(compute/deploy): added the `--no-default-domain` flag to allow for the skipping of automatic domain creation when deploying a Compute service([#1610](https://github.com/fastly/cli/pull/1610))
c.CmdClause.Flag("domain", "The name of the domain associated to the package").Action(c.domain.Set).StringVar(&c.domain.Value)
56
57
c.CmdClause.Flag("env", "The manifest environment config to use (e.g. 'stage' will attempt to read 'fastly.stage.toml')").Action(c.env.Set).StringVar(&c.env.Value)
57
58
c.CmdClause.Flag("include-source", "Include source code in built package").Action(c.includeSrc.Set).BoolVar(&c.includeSrc.Value)
c.CmdClause.Flag("metadata-filter-envvars", "Redact specified environment variables from [scripts.env_vars] using comma-separated list").Action(c.metadataFilterEnvVars.Set).StringVar(&c.metadataFilterEnvVars.Value)
0 commit comments