Description
Welcome to the tfrelease repo. This Python command line utility fetches Terraform release metadata, filters releases based on query, generates release tags, and returns the results in your desired output format [text|json|yaml]. It was built with CI/CD in mind.
Tags
Release tags generated by tfrelease follow the following naming convention. In this example hansohn/terraform is a docker image that been tagged using this tool.
# tag formats
hansohn/terraform:latest latest release of Terraform
hansohn/terraform:1 latest 1.x.x version release of Terraform
hansohn/terraform:1.2 latest 1.2.x version release of Terraform
hansohn/terraform:1.2.3 1.2.3 version of Terraform
Usage
Commands
$ tfrelease --help
Usage: tfrelease [OPTIONS]
Gathers a historical list of Terraform versions and their metadata. Produces
a filtered response based on arguement inputs.
Options:
-c, --count INTEGER Return latest N number of minor release
versions. [default: 1]
-r, --regex TEXT Filter release versions using regex pattern
matching. example: '^(0.15|1)$'
-b, --build TEXT Filter build versions by platform os and
arch. example: 'os=linux,arch=amd64'
-t, --tag-template TEXT Format tags to templatized string. String
template must include '{tag}' keyword which
will be replaced with actual tag value during
formatting. example: 'foo/bar:{tag}-dev'
-o, --output [text|json|yaml] The formatting style for command output.
[default: json]
-L, --vlist Reformats 'versions' key to list of dicts.
Defaults to key/value version dicts.
-M, --major Includes major version tag in metadata of all
lastest major version releases. example:
1.2.3 -> 1
-m, --minor Includes minor version tag in metadata of all
lastest minor version releases. example:
1.2.3 -> 1.2
-p, --prerelease Include pre-release versions in response.
-v, --verbose Include all release metadata in response.
-V, --verboseb Include all release metadata and all builds
in response.
--version Show the version and exit.
--help Show this message and exit.
Makefile
Additionally, a Makefile has been included in this repo to assist with common development-related functions. I've included the following make targets for convenience:
Available targets:
build Build python package
clean Clean everything
clean/build Clean python build directories
clean/docker Clean docker build images
clean/venv Clean virtual environment directory
docker Docker launch testing environment
docker/build Docker build image
docker/lint Lint Dockerfile
docker/push Docker push image
docker/run Docker run image
help Help screen
help/all Display help for all targets
help/short This help short screen
lint Run all linters, validators, and security analyzers
lint/bandit Python security linter
lint/black Python code formatter
lint/flake8 Python styleguide enforcement
lint/mypy Python static typing
lint/pylint Python linter
python/build Python build package
python/packages Python install packages from requirements file(s)
python/venv Python configure virtual environment
upload/check Python upload check
upload/pypi Python upload package to pypi
upload/testpypi Python upload package to testpypi
venv Create virtual environment and install requirements
Metadata
Release files for tfrelease 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tfrelease-0.3.1.tar.gz | 23.5 kB | Without provenance | Details for tfrelease-0.3.1.tar.gz |
Release files / tfrelease-0.3.1.tar.gz
| Download URL | tfrelease-0.3.1.tar.gz |
|---|---|
| Size | 23.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c142351d30ea46c77ff0cfa8b5064d770b2d2c3b0a0928a97c0d95f42615362d
|
|
BLAKE2b-256 checksum How to use checksums |
39ffdca98a6888f8c0ec8ee45d17f0a9fc5e4a23b49272c7da930ee165c3c2a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Security for tfrelease 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.