Skip to content

Commit c703e31

Browse files
committed
preparing v1.6.0 release
1 parent ecd39fa commit c703e31

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### 1.6.0 (Next)
1+
### 1.6.0
22
- Minimum `pytest` version increased to 8.4.0.
33
- Validate minimum version of `pytest`.
44
- Add forced short summary configuration to `compact` parameter functionality.

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
11
# Packer Plugin Testinfra
22
The Packer plugin for [Testinfra](https://testinfra.readthedocs.io) (currently and probably also in the future only the provisioner component implemented) is used with [Packer](https://www.packer.io) for automatically validating Packer-managed custom machine image artifacts against Testinfra tests.
33

4-
## Installation
4+
## Requirements
5+
- Packer >= 1.7.0
6+
- Pytest >= 8.4.0
7+
- Testinfra >= 6.7.0
58

6-
This plugin requires Packer version `>= 1.7.0` due to the modern SDK usage. A simple Packer config located in the same directory as your other templates and configs utilizing this plugin can automatically manage the plugin:
9+
## Installation
10+
A simple Packer config located in the same directory as your other templates and configs utilizing this plugin can automatically manage the plugin:
711

812
```hcl
913
packer {
1014
required_plugins {
1115
testinfra = {
12-
version = "~> 1.5.0"
16+
version = "~> 1.6.0"
1317
source = "github.com/mschuchard/testinfra"
1418
}
1519
}
1620
}
1721
```
1822

19-
Afterwards, `packer init` can automatically manage your plugin as per normal. Note that this plugin currently does not manage your local device's Testinfra installation, and you will need to install that on your local device as a prerequisite for this plugin to function correctly (if not executing local to the instance). If you are using this plugin with `local` enabled, then there is some assistance with managing Testinfra on the temporary Packer instance with the `install_cmd` parameter. The minimum supported version of Testinfra is `6.7.0`. The minimum supported version of Pytest is unknown, but it would be recommended to install a version `>= 7.0.0`.
23+
Afterwards, `packer init` can automatically manage your plugin as per normal. Note that this plugin currently does not manage your local device's Testinfra installation, and you will need to install that on your local device as a prerequisite for this plugin to function correctly (if not executing local to the instance). If you are using this plugin with `local` enabled, then there is some assistance with managing Testinfra on the temporary Packer instance with the `install_cmd` parameter.
2024

2125
## Usage
2226

2327
### Basic Example
2428

25-
A basic example for usage of this plugin with selected optional arguments follows below:
29+
A basic example for usage of this plugin with randomly selected optional arguments follows below:
2630

2731
```hcl
2832
build {
@@ -42,6 +46,7 @@ build {
4246
| **chdir** | Change into this directory before executing `pytest`. Unsupported with `local` test execution. | string | `cwd` | no |
4347
| **compact** | Whether to report in compact form (no header, summary, or warnings). | bool | false | no |
4448
| **destination_dir** | Whether to transfer the `test_files` to the temporary Packer instance used for building the machine image artifact at input value location. Presence of this directory cannot be validated prior to execution. Ignored unless `local` is `true`. The `file` provisioner should normally be preferred instead of this parameter, and this should also be considered a beta feature. | string | "" | no |
49+
| **env_vars** | Additional environment variables to be appended to the system environment variables during test execution. These are ignored if `local` is `true`. | map(string) | {} | no |
4550
| **install_cmd** | Command to execute on the instance used for building the machine image artifact; can be used to e.g. install and configure Testinfra prior to a `local` test execution. Ignored unless `local` is `true`. | list(string) | [] | no |
4651
| **keyword** | PyTest keyword substring expression for selective test execution. | string | "" | no |
4752
| **local** | Execute Testinfra tests locally on the instance used for building the machine image artifact. Most plugin validation is skipped with this option. | bool | false | no |

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func main() {
1515
// register plugin provisioner
1616
packerPluginSet.RegisterProvisioner(plugin.DEFAULT_NAME, new(testinfra.Provisioner))
1717
// set plugin version
18-
pluginVersion := version.NewPluginVersion("1.5.2", "", "")
18+
pluginVersion := version.NewPluginVersion("1.6.0", "", "")
1919
packerPluginSet.SetVersion(pluginVersion)
2020

2121
// execute packer plugin for testinfra

0 commit comments

Comments
 (0)