Note: Commands run on PDK will use the last specified template repository.
Note: Commands run on PDK will use the last specified template repository.
When you have specified the template repository, you can get started with creating a module, if you don't already have one. Once your module is created, you can customize PDK-templates by editing the `.sync.yml` to override the default configuration, and then running `PDK update` on the module so that the new settings are applied.
When you have specified the template repository, you can get started with creating a module, if you don't already have one. Once your module is created, you can customize PDK-templates by editing the `.sync.yml` to override the default configuration, and then running `PDK update` on the module so that the new settings are applied.
For more information on basic usage and more detailed description of PDK in action please refer to [PDK documentation](https://github.com/puppetlabs/pdk/blob/main/README.md), where you can find detailed instructions on how to create, convert and update modules, as well as other useful commands.
For more information on basic usage and more detailed description of PDK in action please refer to [PDK documentation](https://github.com/puppetlabs/pdk/blob/main/README.md), where you can find detailed instructions on how to create, convert and update modules, as well as other useful commands.
## Adjusting templates via /sync.yml
## Adjusting templates via .sync.yml
> While we provide a basic template it is likely that it will not match what you need exactly, as such we allow it to be altered or added to through the use of the `.sync.yml` file.
> While we provide a basic template it is likely that it will not match what you need exactly, as such we allow it to be altered or added to through the use of the `.sync.yml` file.
...
@@ -66,13 +72,13 @@ Here we will provide some examples of how you can use `.sync.yml`. For a more co
...
@@ -66,13 +72,13 @@ Here we will provide some examples of how you can use `.sync.yml`. For a more co
Values can be added to the data passed to the templates, thus allowing you to make changes such as testing against additional operating systems or adding new rubocop rules.
Values can be added to the data passed to the templates, thus allowing you to make changes such as testing against additional operating systems or adding new rubocop rules.
To add a value to an array simply place it into the `.sync.yml` file as shown below, here is the structure to add an additional unit test run against Puppet 4:
To add a value to an array simply place it into the `.sync.yml` file as shown below, here is the structure to add an additional unit test run against Puppet 6:
@@ -80,12 +86,12 @@ To add a value to an array simply place it into the `.sync.yml` file as shown be
...
@@ -80,12 +86,12 @@ To add a value to an array simply place it into the `.sync.yml` file as shown be
Values can be removed from the data passed to the templates using the [knockout prefix](https://www.rubydoc.info/gems/puppet/DeepMerge)`---` in `.sync.yml`.
Values can be removed from the data passed to the templates using the [knockout prefix](https://www.rubydoc.info/gems/puppet/DeepMerge)`---` in `.sync.yml`.
To remove a value from an array, prefix the value `---`. For example, to remove
To remove a value from an array, prefix the value `---`. For example, to remove
`2.5.1` from the `ruby_versions` array in `.travis.yml`:
`2.7.8` from the `ruby_versions` array in `.travis.yml`:
```yaml
```yaml
.travis.yml:
.travis.yml:
ruby_versions:
ruby_versions:
-'---2.5.1'
-'---2.7.8'
```
```
To remove a key from a hash, set the value to `---`. For example, to remove the
To remove a key from a hash, set the value to `---`. For example, to remove the
...
@@ -143,8 +149,8 @@ To disable or enable certain Rubocop rules, use the following structure:
...
@@ -143,8 +149,8 @@ To disable or enable certain Rubocop rules, use the following structure:
```yaml
```yaml
.rubocop.yml:
.rubocop.yml:
default_configs:
default_configs:
Rule/Name:
Style/Documentation:
Enabled:true/false
Enabled:false
```
```
## PDK default config values
## PDK default config values
...
@@ -184,7 +190,7 @@ The following is a description and explanation of each of the keys within `.conf
...
@@ -184,7 +190,7 @@ The following is a description and explanation of each of the keys within `.conf
### .github/workflows/release_prep.yml
### .github/workflows/release_prep.yml
> The auto release workflows prepares a module release PR. By default the workflow can be triggered manually when a release preparation PR needs to be created, however it allows setting a cron based trigger that can run automatically. To set up the automated release cron you can add a configuration to your .sync.yml file that matches the following example:
> The release_prep workflow prepares a module release PR. By default the workflow can be triggered manually when a release preparation PR needs to be created, however it allows setting a cron based trigger that can run automatically. To set up the automated release cron you can add a configuration to your .sync.yml file that matches the following example: