Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure 'modules' with 'bolt project init' #2210

Closed
beechtom opened this issue Sep 24, 2020 · 0 comments · Fixed by #2211 or #2341
Closed

Configure 'modules' with 'bolt project init' #2210

beechtom opened this issue Sep 24, 2020 · 0 comments · Fixed by #2211 or #2341
Assignees
Labels
Blocked Work blocked by other issues or PRs. Feature New features and improvements.

Comments

@beechtom
Copy link
Contributor

Use Case

To simplify the process of getting started with the module workflow, the bolt project init command should be updated to configure modules in bolt-project.yaml.

Describe the Solution You Would Like

  • If run with --modules, modules should have an array of module declarations
  • If run without --modules, modules should be an empty array
  • If running in a directory that already has a bolt-project.yaml, but no Puppetfile, the bolt-project.yaml should be updated to configure modules

Questions

  • Updating an existing project config file when there is no Puppetfile seems a bit odd. Do we want to take this opportunity to have bolt project init only run if there is no bolt-project.yaml? Maybe not until 3.0, as this is a breaking change?

Additional Context

  • We should not merge this change until the module workflow is stable.
@beechtom beechtom added the Feature New features and improvements. label Sep 24, 2020
beechtom added a commit to beechtom/bolt that referenced this issue Sep 24, 2020
This updates the `bolt project init` command to configure `modules` in
`bolt-project.yaml`, allowing users with new projects to immediately
start using the module workflow.

- If `bolt project init` is run, `modules` will be an empty array `[]`
- If `bolt project init --modules` is run, `modules` will be an array of
  declarations for the specified modules

This also updates the command so that it can only be run once per
project. Previously, if a project had a configuration file, but no
`Puppetfile`, the `bolt project init --modules` command would still
install modules. Now, Bolt will error in this case and display a helpful
error that the user should instead use the `bolt module add` command.

!feature

* **Configure `modules` with `bolt project init`**
  ([puppetlabs#2110](puppetlabs#2210))

  The `bolt project init` command will now configure the `modules` key
  in the `bolt-project.yaml` file, enabling the `bolt module` command.
@beechtom beechtom added Blocked Work blocked by other issues or PRs. Do Not Merge Work that should not be merged yet. labels Sep 24, 2020
@beechtom beechtom self-assigned this Sep 24, 2020
beechtom added a commit to beechtom/bolt that referenced this issue Sep 28, 2020
This updates the `bolt project init` command to configure `modules` in
`bolt-project.yaml`, allowing users with new projects to immediately
start using the module workflow.

- If `bolt project init` is run, `modules` will be an empty array `[]`
- If `bolt project init --modules` is run, `modules` will be an array of
  declarations for the specified modules

This also updates the command so that it can only be run once per
project. Previously, if a project had a configuration file, but no
`Puppetfile`, the `bolt project init --modules` command would still
install modules. Now, Bolt will error in this case and display a helpful
error that the user should instead use the `bolt module add` command.

!feature

* **Configure `modules` with `bolt project init`**
  ([puppetlabs#2110](puppetlabs#2210))

  The `bolt project init` command will now configure the `modules` key
  in the `bolt-project.yaml` file, enabling the `bolt module` command.
beechtom added a commit to beechtom/bolt that referenced this issue Nov 10, 2020
This updates the `bolt project init` command to configure `modules` in
`bolt-project.yaml`, allowing users with new projects to immediately
start using the module workflow.

- If `bolt project init` is run, `modules` will be an empty array `[]`
- If `bolt project init --modules` is run, `modules` will be an array of
  declarations for the specified modules

This also updates the command so that it can only be run once per
project. Previously, if a project had a configuration file, but no
`Puppetfile`, the `bolt project init --modules` command would still
install modules. Now, Bolt will error in this case and display a helpful
error that the user should instead use the `bolt module add` command.

!feature

* **Configure `modules` with `bolt project init`**
  ([puppetlabs#2110](puppetlabs#2210))

  The `bolt project init` command will now configure the `modules` key
  in the `bolt-project.yaml` file, enabling the `bolt module` command.
beechtom added a commit to beechtom/bolt that referenced this issue Nov 10, 2020
This updates the `bolt project init` command to configure `modules` in
`bolt-project.yaml`, allowing users with new projects to immediately
start using the module workflow.

- If `bolt project init` is run, `modules` will be an empty array `[]`
- If `bolt project init --modules` is run, `modules` will be an array of
  declarations for the specified modules

This also updates the command so that it can only be run once per
project. Previously, if a project had a configuration file, but no
`Puppetfile`, the `bolt project init --modules` command would still
install modules. Now, Bolt will error in this case and display a helpful
error that the user should instead use the `bolt module add` command.

!feature

* **Configure `modules` with `bolt project init`**
  ([puppetlabs#2110](puppetlabs#2210))

  The `bolt project init` command will now configure the `modules` key
  in the `bolt-project.yaml` file, enabling the `bolt module` command.
@lucywyman lucywyman removed Blocked Work blocked by other issues or PRs. Do Not Merge Work that should not be merged yet. labels Nov 11, 2020
lucywyman added a commit that referenced this issue Nov 11, 2020
(GH-2210) Configure 'modules' with 'bolt project init'
beechtom added a commit that referenced this issue Nov 11, 2020
…ject-init

Revert "(GH-2210) Configure 'modules' with 'bolt project init'"
beechtom added a commit to beechtom/bolt that referenced this issue Nov 11, 2020
This updates the `bolt project init` command to configure `modules` in
`bolt-project.yaml`, allowing users with new projects to immediately
start using the module workflow.

- If `bolt project init` is run, `modules` will be an empty array `[]`
- If `bolt project init --modules` is run, `modules` will be an array of
  declarations for the specified modules

This also updates the command so that it can only be run once per
project. Previously, if a project had a configuration file, but no
`Puppetfile`, the `bolt project init --modules` command would still
install modules. Now, Bolt will error in this case and display a helpful
error that the user should instead use the `bolt module add` command.

!feature

* **Configure `modules` with `bolt project init`**
  ([puppetlabs#2110](puppetlabs#2210))

  The `bolt project init` command will now configure the `modules` key
  in the `bolt-project.yaml` file, enabling the `bolt module` command.
@beechtom beechtom reopened this Nov 11, 2020
@beechtom beechtom linked a pull request Nov 11, 2020 that will close this issue
@beechtom beechtom added the Blocked Work blocked by other issues or PRs. label Nov 11, 2020
lucywyman added a commit that referenced this issue Nov 20, 2020
(GH-2210) Configure 'modules' with 'bolt project init'
dontlaugh pushed a commit to dontlaugh/bolt that referenced this issue Dec 18, 2020
This updates the `bolt project init` command to configure `modules` in
`bolt-project.yaml`, allowing users with new projects to immediately
start using the module workflow.

- If `bolt project init` is run, `modules` will be an empty array `[]`
- If `bolt project init --modules` is run, `modules` will be an array of
  declarations for the specified modules

This also updates the command so that it can only be run once per
project. Previously, if a project had a configuration file, but no
`Puppetfile`, the `bolt project init --modules` command would still
install modules. Now, Bolt will error in this case and display a helpful
error that the user should instead use the `bolt module add` command.

!feature

* **Configure `modules` with `bolt project init`**
  ([puppetlabs#2110](puppetlabs#2210))

  The `bolt project init` command will now configure the `modules` key
  in the `bolt-project.yaml` file, enabling the `bolt module` command.
dontlaugh pushed a commit to dontlaugh/bolt that referenced this issue Dec 18, 2020
dontlaugh pushed a commit to dontlaugh/bolt that referenced this issue Dec 18, 2020
This updates the `bolt project init` command to configure `modules` in
`bolt-project.yaml`, allowing users with new projects to immediately
start using the module workflow.

- If `bolt project init` is run, `modules` will be an empty array `[]`
- If `bolt project init --modules` is run, `modules` will be an array of
  declarations for the specified modules

This also updates the command so that it can only be run once per
project. Previously, if a project had a configuration file, but no
`Puppetfile`, the `bolt project init --modules` command would still
install modules. Now, Bolt will error in this case and display a helpful
error that the user should instead use the `bolt module add` command.

!feature

* **Configure `modules` with `bolt project init`**
  ([puppetlabs#2110](puppetlabs#2210))

  The `bolt project init` command will now configure the `modules` key
  in the `bolt-project.yaml` file, enabling the `bolt module` command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked Work blocked by other issues or PRs. Feature New features and improvements.
Projects
None yet
2 participants