Skip to content

Commit

Permalink
preparing v1.4.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
mschuchard committed Aug 4, 2024
1 parent dcfe39b commit f78bb4d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### 1.4.0 (Next)
### 1.4.0
- Support multiple levels of verbose (argument bool to int).
- Update parallel execution behavior (argument name change and int to bool).

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ This plugin requires Packer version `>= 1.7.0` due to the modern SDK usage. A si
packer {
required_plugins {
testinfra = {
version = "~> 1.3.0"
version = "~> 1.4.0"
source = "github.com/mschuchard/testinfra"
}
}
}
```

Afterwards, `packer init` can automatically manage your plugin as per normal. Note that this plugin currently does not manage your local Testinfra installation, and you will need to install that on your local device as a prerequisite for this plugin to function correctly. If you are using this plugin with `local` enabled, then there is some assistance with managing Testinfra on the temporary Packer instance with `install_cmd`. The minimum supported version of Testinfra is `6.7.0`, but a lower version may be possible if you are not using the SSH communicator. The minimum supported version of Pytest is unknown, but it would be recommended to install a version `>= 7.0.0`.
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`.

## Usage

Expand All @@ -27,10 +27,10 @@ A basic example for usage of this plugin with selected optional arguments follow
```hcl
build {
provisioner "testinfra" {
processes = 2
pytest_path = "/usr/local/bin/py.test"
sudo = false
test_files = ["${path.root}/test.py", "${path.root}/test_other.py"]
verbose = 2
}
}
```
Expand All @@ -40,16 +40,16 @@ build {
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| **chdir** | Change into this directory before executing `pytest`. Unsupported with `local` test execution. | string | `cwd` | no |
| **install_cmd** | Command to execute on the instance used for building the machine image artifact; can be used to install and configure Testinfra prior to a `local` test execution. | list(string) | [] | no |
| **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 |
| **keyword** | PyTest keyword substring expression for selective test execution. | string | "" | no |
| **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 |
| **marker** | PyTest marker expression for selective test execution. | string | "" | no |
| **processes** | The number of parallel processes for Testinfra test execution. This parameter requires installation of the [pytest-xdist](https://pypi.org/project/pytest-xdist/) plugin. | number | 0 | no |
| **parallel** | Whether to execute the Testinfra tests in parallel across the available physical CPUs. This parameter requires installation of the [pytest-xdist](https://pypi.org/project/pytest-xdist) plugin. | bool | false | no |
| **pytest_path** | The path to the installed `py.test` executable for initiating the Testinfra tests. | string | "py.test" | no |
| **sudo** | Whether or not to execute the tests with `sudo` elevated permissions. | bool | false | no |
| **sudo_user** | User to become when executing the tests. Mutually exclusive with `sudo`, and therefore ignored when `sudo` is input as `true`. | string | "" | no |
| **test_files** | The paths to the files containing the Testinfra tests for execution and validation of the machine image artifact. The default empty value will execute default PyTest behavior of all test files prefixed with `test_` recursively discovered from the current working directory. | list(string) | [] | no |
| **verbose** | Whether or not to execute the tests with Pytest verbosity enabled. | bool | false | no |
| **verbose** | The level of Pytest verbose enabled (value corresponds to the number of `v` flags). Maximum value is `4`. | number | 0 | no |

### Communicators

Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package version
import "github.com/hashicorp/packer-plugin-sdk/version"

// Version is the main version number that is being run at the moment.
const Version = "1.3.1"
const Version = "1.4.0"

// PluginVersion is used by the plugin set to enable Packer to recognize the plugin version.
// hardcode prerelease to empty string
Expand Down

0 comments on commit f78bb4d

Please sign in to comment.