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

Commit

Permalink
Merge pull request #211 from sanfrancrisko/maint/main/release_prep_0_4_0
Browse files Browse the repository at this point in the history
Update CHANGELOG for 0.4.0
  • Loading branch information
da-ar authored Sep 17, 2021
2 parents a8ccc6c + 6a912d8 commit d18bd02
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 29 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.0]

### Changed

- The Puppet Content templates shipped in 0.4.0 and the handling of templates in 0.4.0 is _not_ backward compatible with templates which do not have `id`, `author`, AND `version` defined in their metadata

### Added

- [(GH-183)](https://github.com/uppetlabs/pdkgo/issues/183) `pct new` handles namespaced templates
- [(GH-184)](https://github.com/uppetlabs/pdkgo/issues/184) `pct install` works against remote `tar.gz` files
- [(GH-185)](https://github.com/puppetlabs/pdkgo/issues/185) `pct build` validates pct-config.yml
- [(GH-167)](https://github.com/puppetlabs/pdkgo/issues/167) Implement `pct install` CLI command
- [(TEMPLATES-17)](https://github.com/puppetlabs/baker-round/issues/17) Ensure `puppet-content-template` includes the author key in the scaffolded config file
- [(TEMPLATES-18)](https://github.com/puppetlabs/baker-round/issues/18) Ensure all default templates have their author set to `puppetlabs`

## [0.3.0]

Expand Down Expand Up @@ -54,7 +65,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- [(GH-29)](https://github.com/puppetlabs/pdkgo/issues/29) Error if template not found

[Unreleased]: https://github.com/puppetlabs/pdkgo/compare/0.3.0..main
[Unreleased]: https://github.com/puppetlabs/pdkgo/compare/0.4.0..main
[0.4.0]: https://github.com/puppetlabs/pdkgo/releases/tag/0.3.0
[0.3.0]: https://github.com/puppetlabs/pdkgo/releases/tag/0.3.0
[0.2.0]: https://github.com/puppetlabs/pdkgo/releases/tag/0.2.0
[0.1.0]: https://github.com/puppetlabs/pdkgo/releases/tag/0.1.0
Expand Down
59 changes: 31 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ If we `cd` in to the module root dir, everything will get deployed with the corr
### **STEP 3:** Add a Github Actions Workflow

Want to know what configurable parameters are availble for a template and their defaults?
Run `pct new --info <TEMPLATE_ID>`:
Run `pct new --info <TEMPLATE_AUTHOR>/<TEMPLATE_ID>`:

![new_info](docs/_resources/new_info.gif)

Expand Down Expand Up @@ -123,43 +123,43 @@ pct new --list
Example output:

```bash
DISPLAYNAME | NAME | TYPE
--------------------------------+-------------------------+----------
| |
Bolt Plan | bolt-plan | item
Bolt Project | bolt-project | project
Bolt PowerShell Task | bolt-pwsh-task | item
Bolt YAML Plan | bolt-yaml-plan | item
Puppet Module Managed Gemfile | git-attributes | item
Puppet Class | puppet-class | item
Puppet Content Template | puppet-content-template | project
Puppet Defined Type | puppet-defined-type | item
Puppet Fact | puppet-fact | item
Puppet Module | puppet-module | project
Puppet Resource API Provider | rsapi-provider | item
Puppet Resource API Transport | puppet-transport | item
DISPLAYNAME | AUTHOR | NAME | TYPE
--------------------------------+------------+-------------------------+------
| | |
Bolt Plan | puppetlabs | bolt-plan | item
Bolt Project | puppetlabs | bolt-project | project
Bolt PowerShell Task | puppetlabs | bolt-pwsh-task | item
Bolt YAML Plan | puppetlabs | bolt-yaml-plan | item
Puppet Module Managed Gemfile | puppetlabs | git-attributes | item
Puppet Class | puppetlabs | puppet-class | item
Puppet Content Template | puppetlabs | puppet-content-template | project
Puppet Defined Type | puppetlabs | puppet-defined-type | item
Puppet Fact | puppetlabs | puppet-fact | item
Puppet Module | puppetlabs | puppet-module | project
Puppet Resource API Provider | puppetlabs | rsapi-provider | item
Puppet Resource API Transport | puppetlabs | puppet-transport | item
```

Using the available templates above, its time to generate some content.

``` bash
pct new <template>
pct new <author>/<template>
```

Replace `<template>` with the `name` of the template containing the content you want.
Replace `<author>` and `<template>` with the `author` and `name` of the template containing the content you want.

By default the `new <template>` function will use the directory name of your current working directory to "name" your new content.
By default the `new <author>/<template>` function will use the directory name of your current working directory to "name" your new content.
To override this behaviour use the `--name` or `-n` flag.

``` bash
pct new <template> --name MyProject
pct new <author>/<template> --name MyProject
```

By default the `new <template>` function will output the template content to the current working directory.
By default the `new <author>/<template>` function will output the template content to the current working directory.
To override this behavour use the `--output` or `-o` flag.

``` bash
pct new <template> --output /path/to/your/project
pct new <author>/<template> --output /path/to/your/project
```

> :memo: Not all templates require a `name`. If a template doesn't require one, providing a value to the `--name` parameter will have no effect on the generated content.
Expand All @@ -168,15 +168,15 @@ pct new <template> --output /path/to/your/project

``` bash
> cd /home/me/projects/MyBoltProject
> pct new bolt-project
> pct new puppetlabs/bolt-project
```

``` bash
> pct new puppet-module -n MyNewProject -o /home/me/projects/
> cd /home/me/projects/MyNewProject
> pct new puppet-fact -n ApplicationVersion
> pct new rsapi-provider -n Awesomething
> pct new puppet-transport -n AwesomethingApi
> pct new puppetlabs/puppet-fact -n ApplicationVersion
> pct new puppetlabs/rsapi-provider -n Awesomething
> pct new puppetlabs/puppet-transport -n AwesomethingApi
```

### Template Updates
Expand All @@ -198,7 +198,7 @@ A PCT is an archive containing a templated set of files and folders that represe
You can specify the location of your templates using the `--templatepath` option:

```bash
pct new my-custom-project --templatepath /home/me/templates
pct new my-name/my-custom-project --templatepath /home/me/templates
```

### Composition
Expand Down Expand Up @@ -228,6 +228,7 @@ Format of pct-config.yml
---
template:
id: <a unique name>
author: <name|username|orgname|handle|etc>
type: <'item' or 'project'>
display: <a human readable name>
version: <semver>
Expand All @@ -236,14 +237,15 @@ template:
<template parameters>
```

> :memo: Template `id` must not contain spaces or special characters. We recommend using a hyphen to break up the identifier.
> :memo: Template `id` and `author` must not contain spaces or special characters. We recommend using a hyphen to break up the identifier.
Example pct-config.yml:

``` yaml
---
template:
id: example-template
author: myorgname
type: project
display: Example
version: 0.1.0
Expand All @@ -270,6 +272,7 @@ Example pct-config.yml with parameters:
---
template:
id: example-template-params
author: myorgname
type: project
display: Example with Parameters
version: 0.1.0
Expand Down

0 comments on commit d18bd02

Please sign in to comment.