Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Puppet Content Template system Part 1#2

Merged
da-ar merged 3 commits intomainfrom
pdk-new-cmd
May 14, 2021
Merged

Puppet Content Template system Part 1#2
da-ar merged 3 commits intomainfrom
pdk-new-cmd

Conversation

@jpogran
Copy link
Copy Markdown
Contributor

@jpogran jpogran commented Apr 7, 2021

Creates the pct golang package which allows users to list and deploy Puppet Content Templates and modifies the new command to list and deploy PCTs.

There is much more to implement, but this is the start. This can list and format the display of the PCTs installed on a local filesystem. It shows PCT details like id and names and provides autocomplete functionality for the shell commands. It can deploy a selected template to a target file path based on the pct-config.yml configuration file inside the PCT and from the ~/.pdk/pct.yml user level configuration file.

This also changes the binary name to pct to reflect that this is currently an experiment of the PCT system. This also ensures that use of this binary does not conflict with the shipped PDK command name until we start shipping the final form. Lastly this updates goreleaser.yml to set the version, short commit hash, and commit date inside the binary as its compiled. This enables accurate deployment information in pdk --version as well as for use inside templates.

@jpogran jpogran requested a review from a team as a code owner April 7, 2021 20:06
@jpogran jpogran force-pushed the pdk-new-cmd branch 2 times, most recently from c9a5b56 to 79740ad Compare April 13, 2021 17:10
@jpogran jpogran marked this pull request as draft April 26, 2021 15:51
@jpogran jpogran force-pushed the pdk-new-cmd branch 2 times, most recently from 5752d5a to 43639c9 Compare May 6, 2021 17:59
@jpogran jpogran self-assigned this May 6, 2021
@jpogran jpogran added the enhancement New feature or request label May 6, 2021
@jpogran jpogran added this to the Base Template API milestone May 6, 2021
@jpogran jpogran linked an issue May 6, 2021 that may be closed by this pull request
@jpogran jpogran force-pushed the pdk-new-cmd branch 9 times, most recently from 755ab1b to 2576679 Compare May 10, 2021 20:25
Comment thread internal/pkg/pct/pct.go Outdated
@jpogran jpogran force-pushed the pdk-new-cmd branch 3 times, most recently from 29b6543 to 1cd9b58 Compare May 12, 2021 11:32
@jpogran jpogran removed this from the Base Template API milestone May 12, 2021
jpogran added 2 commits May 13, 2021 11:47
Creates the pct golang package which allows users to list and deploy Puppet Content Templates. There is much more to implement, but this is the start.

It can list and format the display of the PCTs installed on a local filesystem. This shows PCT details like id and names and provides autocomplete functionality for the shell commands.

It can deploy a selected template to a target file path based on the `pct-config.yml` configuration file inside the PCT and from the `~/.pdk/pct.yml` user level configuration file.
Removes all subcomands for `pdk new` and adapts `pdk new` to use the PCT golang package.

The unit tests for `pdk new` pass but do not actually test any PCT functionality. Tests for PCT functionality are inside the PCT package. A future work item is to either adapt a unit test that can accurately exercise the command line here, or add that as an acceptance test instead.
@jpogran jpogran added this to the PCT LA Release milestone May 13, 2021
Sets the binary name to `pct` to reflect that this is currently an experiment of the PCT system. This also ensures that use of this binary does not conflict with the shipped PDK command name until we start shipping the final form.

Updates goreleaser config file to set the version, short commit hash, and commit date inside the binary as its compiled. This enables accurate deployment information in `pdk --version` as well as for use inside templates.
@jpogran jpogran changed the title pdk new Puppet Content Template system Part 1 May 13, 2021
@jpogran jpogran marked this pull request as ready for review May 13, 2021 16:14
@jpogran jpogran requested a review from a team May 13, 2021 16:16
@jpogran jpogran linked an issue May 13, 2021 that may be closed by this pull request
4 tasks
@da-ar da-ar merged commit a2042f7 into main May 14, 2021
@da-ar da-ar deleted the pdk-new-cmd branch May 14, 2021 10:47
@jpogran jpogran removed a link to an issue May 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up existing expermental template code

3 participants