Skip to content

Commit

Permalink
Prepare releases of all plugins (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgolsson authored Jun 18, 2023
1 parent d07cb2d commit 0dea8bc
Show file tree
Hide file tree
Showing 19 changed files with 71 additions and 25 deletions.
2 changes: 1 addition & 1 deletion pants-plugins/bitwarden/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ python_distribution_with_secret(
],
provides=python_artifact(
name="pants_backend_bitwarden",
version="0.1.0",
version="0.2.0",
long_description_content_type="markdown",
),
long_description_path="pants-plugins/bitwarden/README.md",
Expand Down
4 changes: 4 additions & 0 deletions pants-plugins/bitwarden/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2022-06-18

* Target pants version is now 2.16.0, with support for 2.15.0.

## 0.1.0 - 2023-02-10

* Initial release
4 changes: 2 additions & 2 deletions pants-plugins/bitwarden/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[project]
name = "pants_backend_bitwarden"
description = "A Bitwarden plugin for the Pants build system"
version = "0.1.0"
version = "0.2.0"
authors = [
{ name = "Tom Solberg", email = "[email protected]" }
]

dependencies = [
"pants_backend_secrets>=0.1.0"
"pants_backend_secrets>=0.2.0"
]

readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion pants-plugins/k8s/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ python_distribution_with_secret(
],
provides=python_artifact(
name="pants_backend_k8s",
version="0.1.1",
version="0.2.0",
long_description_content_type="markdown",
),
long_description_path="pants-plugins/k8s/README.md",
Expand Down
4 changes: 2 additions & 2 deletions pants-plugins/k8s/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

## [Unreleased]
## [0.2.0] - 2022-06-18

* Add support for 2.16.0a0
* Target pants version is now 2.16.0, with support for 2.15.0.

## [0.1.1] - 2022-11-17

Expand Down
2 changes: 1 addition & 1 deletion pants-plugins/k8s/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "pants_backend_k8s"
description = "A Kubernetes plugin for the Pants build system"
version = "0.1.1"
version = "0.2.0"
authors = [
{ name = "Tom Solberg", email = "[email protected]" }
]
Expand Down
2 changes: 1 addition & 1 deletion pants-plugins/kustomize/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ python_distribution_with_secret(
],
provides=python_artifact(
name="pants_backend_kustomize",
version="0.1.2",
version="0.2.0",
long_description_content_type="markdown",
),
long_description_path="pants-plugins/kustomize/README.md",
Expand Down
4 changes: 2 additions & 2 deletions pants-plugins/kustomize/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.2.0] - 2022-06-18

* Add support for 2.16.0a0
* Target pants version is now 2.16.0, with support for 2.15.0.

## [0.1.2] - 2022-12-06

Expand Down
4 changes: 2 additions & 2 deletions pants-plugins/kustomize/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[project]
name = "pants_backend_kustomize"
description = "A Kustomize plugin for the Pants build system"
version = "0.1.2"
version = "0.2.0"
authors = [
{ name = "Tom Solberg", email = "[email protected]" }
]

dependencies = [
"pants_backend_k8s~=0.1.1"
"pants_backend_k8s>=0.2"
]

readme = "README.md"
Expand Down
3 changes: 2 additions & 1 deletion pants-plugins/mdbook/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
resources(
name="package_data", sources=["pyproject.toml", "README.md", "LICENSE-MIT.txt", "CHANGELOG.md"]
)

python_distribution_with_secret(
name="package",
dependencies=[
Expand All @@ -9,7 +10,7 @@ python_distribution_with_secret(
],
provides=python_artifact(
name="pants_backend_mdbook",
version="0.1.3",
version="0.2.0",
long_description_content_type="markdown",
),
long_description_path="pants-plugins/mdbook/README.md",
Expand Down
4 changes: 2 additions & 2 deletions pants-plugins/mdbook/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

## [Unreleased]
## [0.2.0] - 2022-06-18

* Add support for 2.16.0a0
* Target pants version is now 2.16.0, with support for 2.15.0.

## [0.1.3] - 2022-11-18

Expand Down
2 changes: 1 addition & 1 deletion pants-plugins/mdbook/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "pants_backend_mdbook"
description = "A MdBook documentation builder plugin for the Pants buildsystem."
version = "0.1.3"
version = "0.2.0"
authors = [
{ name = "Tom Solberg", email = "[email protected]" }
]
Expand Down
2 changes: 1 addition & 1 deletion pants-plugins/oci/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ python_distribution_with_secret(
],
provides=python_artifact(
name="pants_backend_oci",
version="0.3.1",
version="0.4.0",
long_description_content_type="markdown",
),
long_description_path="pants-plugins/oci/README.md",
Expand Down
13 changes: 11 additions & 2 deletions pants-plugins/oci/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## 0.4.0 - 2023-06-18

- Improved support for very large layers > 2GB. A lot of layers will now be compressed in
transit. This adds some overhead later when injecting them into image, but fixes some crashes
inside Pants.

- **Improved support for multi-stage builds** (`COPY --from`)

There is now support for building artifacts in one container and copying them into a new
container. To do this, use `oci_build_layer`, and configure the output files and directories. The
files and data will be inserted verbatim into the downstream container.

- **Adds support for empty base images** (`FROM scratch`)

This change enables you to use `base=["//:empty"]` to start from a completely empty
container. This can be useful to produce containers with statically linked binaries that require
no runtime environment at all.

Note that for Pants 2.14 you'll need to manually declare the base image: `oci_image_empty(name="empty")`.

- To change the target name, set `[oci].empty_image_target` in `pants.toml`.

Expand Down
32 changes: 30 additions & 2 deletions pants-plugins/oci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ This is a backend implementing support for building OCI images in pants; running

## Targets

There's three targets currently implemented:
There's six targets currently implemented, of which five are generic:

* `oci_pull_image`
* `oci_pull_images`
* `oci_image_build`
* `oci_image_empty`
* `oci_build_layer`

There are also plans to support targets optimized for various languages. There's currently one special target for Python, which will preferentially set the entrypoint to Pex files, `oci_python_image`.
And one with some special language semantics:

* `oci_python_image` - this is the same as `oci_image_build`, but will prefer to set the entrypoint to `.pex` files.

### `oci_pull_image`

Expand Down Expand Up @@ -139,3 +142,28 @@ oci_image_empty(
| `name` | The target name | Same as any other target, which is the directory name |
| `decsription` | A description of the target | |
| `tags` | List of tags | `[]` |

### `oci_build_layer`

Run an image command, and capture the configured output into a layer artifact, that can be injected into other images. This matches the `COPY --from` workflows.

oci_build_layer(
name="layer"
base=[":rust-1-70"],
packages=[":files"],
env=['RUSTC_OPTS=...'],
command=['cd /my-package && cargo build --release'],
outputs=['/my-package/target/release/my-package'],
)
```
| Argument | Meaning | Default value |
|---------------|--------------------------------------------------------------------------------|--------------------------------------------------------|
| `name` | The target name | Same as any other target, which is the directory name |
| `packages` | Packaged targets to include. The first element will be used as the entrypoint. | `[]` |
| `env` | Environment variables to set. Does not support interpolation. | `[]` |
| `outputs` | Paths to capture into the built layer. | `[]` |
| `exclude` | Globs to not include in the output. | `[]` |
| `decsription` | A description of the target | |
| `output_path` | The output path during `pants package` | A variant generated from the target name and directory |
| `tags` | List of tags | `[]` |
4 changes: 2 additions & 2 deletions pants-plugins/oci/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[project]
name = "pants_backend_oci"
description = "An OCI plugin for the Pants build system"
version = "0.3.1"
version = "0.4.0"
authors = [
{ name = "Tom Solberg", email = "[email protected]" }
]

dependencies = [
"pants-backend-kustomize>=0.1"
"pants-backend-kustomize>=0.2"
]

readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion pants-plugins/secrets/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ python_distribution_with_secret(
],
provides=python_artifact(
name="pants_backend_secrets",
version="0.1.0",
version="0.2.0",
long_description_content_type="markdown",
),
long_description_path="pants-plugins/secrets/README.md",
Expand Down
4 changes: 4 additions & 0 deletions pants-plugins/secrets/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2022-06-18

* Target pants version is now 2.16.0, with support for 2.15.0.

## 0.1.0 - 2023-02-10

* Initial release
2 changes: 1 addition & 1 deletion pants-plugins/secrets/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "pants_backend_secrets"
description = "A secrets plumbing plugin for the Pants build system"
version = "0.1.0"
version = "0.2.0"
authors = [
{ name = "Tom Solberg", email = "[email protected]" }
]
Expand Down

0 comments on commit 0dea8bc

Please sign in to comment.