diff --git a/pants-plugins/bitwarden/BUILD b/pants-plugins/bitwarden/BUILD index 57cd0c9..9e46dd5 100644 --- a/pants-plugins/bitwarden/BUILD +++ b/pants-plugins/bitwarden/BUILD @@ -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", diff --git a/pants-plugins/bitwarden/CHANGELOG.md b/pants-plugins/bitwarden/CHANGELOG.md index 7a7ffed..c5bed9c 100644 --- a/pants-plugins/bitwarden/CHANGELOG.md +++ b/pants-plugins/bitwarden/CHANGELOG.md @@ -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 diff --git a/pants-plugins/bitwarden/pyproject.toml b/pants-plugins/bitwarden/pyproject.toml index b0f8a9b..6eb0bb0 100644 --- a/pants-plugins/bitwarden/pyproject.toml +++ b/pants-plugins/bitwarden/pyproject.toml @@ -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 = "me@sbg.dev" } ] dependencies = [ - "pants_backend_secrets>=0.1.0" + "pants_backend_secrets>=0.2.0" ] readme = "README.md" diff --git a/pants-plugins/k8s/BUILD b/pants-plugins/k8s/BUILD index fbcce9d..0e5023d 100644 --- a/pants-plugins/k8s/BUILD +++ b/pants-plugins/k8s/BUILD @@ -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", diff --git a/pants-plugins/k8s/CHANGELOG.md b/pants-plugins/k8s/CHANGELOG.md index 79be9e3..d2b1330 100644 --- a/pants-plugins/k8s/CHANGELOG.md +++ b/pants-plugins/k8s/CHANGELOG.md @@ -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 diff --git a/pants-plugins/k8s/pyproject.toml b/pants-plugins/k8s/pyproject.toml index 1d7decf..70efb8b 100644 --- a/pants-plugins/k8s/pyproject.toml +++ b/pants-plugins/k8s/pyproject.toml @@ -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 = "me@sbg.dev" } ] diff --git a/pants-plugins/kustomize/BUILD b/pants-plugins/kustomize/BUILD index 9ae0477..f91d845 100644 --- a/pants-plugins/kustomize/BUILD +++ b/pants-plugins/kustomize/BUILD @@ -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", diff --git a/pants-plugins/kustomize/CHANGELOG.md b/pants-plugins/kustomize/CHANGELOG.md index 9f19e78..da2ef4f 100644 --- a/pants-plugins/kustomize/CHANGELOG.md +++ b/pants-plugins/kustomize/CHANGELOG.md @@ -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 diff --git a/pants-plugins/kustomize/pyproject.toml b/pants-plugins/kustomize/pyproject.toml index 1ad51a4..cdfe12b 100644 --- a/pants-plugins/kustomize/pyproject.toml +++ b/pants-plugins/kustomize/pyproject.toml @@ -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 = "me@sbg.dev" } ] dependencies = [ - "pants_backend_k8s~=0.1.1" + "pants_backend_k8s>=0.2" ] readme = "README.md" diff --git a/pants-plugins/mdbook/BUILD b/pants-plugins/mdbook/BUILD index 633d5a4..3e36540 100644 --- a/pants-plugins/mdbook/BUILD +++ b/pants-plugins/mdbook/BUILD @@ -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=[ @@ -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", diff --git a/pants-plugins/mdbook/CHANGELOG.md b/pants-plugins/mdbook/CHANGELOG.md index 78a9233..cdcd5d9 100644 --- a/pants-plugins/mdbook/CHANGELOG.md +++ b/pants-plugins/mdbook/CHANGELOG.md @@ -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 diff --git a/pants-plugins/mdbook/pyproject.toml b/pants-plugins/mdbook/pyproject.toml index 5eb7795..4065448 100644 --- a/pants-plugins/mdbook/pyproject.toml +++ b/pants-plugins/mdbook/pyproject.toml @@ -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 = "me@sbg.dev" } ] diff --git a/pants-plugins/oci/BUILD b/pants-plugins/oci/BUILD index 092df7e..cd55277 100644 --- a/pants-plugins/oci/BUILD +++ b/pants-plugins/oci/BUILD @@ -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", diff --git a/pants-plugins/oci/CHANGELOG.md b/pants-plugins/oci/CHANGELOG.md index e4d8fec..80b0498 100644 --- a/pants-plugins/oci/CHANGELOG.md +++ b/pants-plugins/oci/CHANGELOG.md @@ -5,7 +5,17 @@ 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`) @@ -13,7 +23,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 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`. diff --git a/pants-plugins/oci/README.md b/pants-plugins/oci/README.md index c1f65f8..d9b2d37 100644 --- a/pants-plugins/oci/README.md +++ b/pants-plugins/oci/README.md @@ -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` @@ -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 | `[]` | diff --git a/pants-plugins/oci/pyproject.toml b/pants-plugins/oci/pyproject.toml index 34767e0..9ff027f 100644 --- a/pants-plugins/oci/pyproject.toml +++ b/pants-plugins/oci/pyproject.toml @@ -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 = "me@sbg.dev" } ] dependencies = [ - "pants-backend-kustomize>=0.1" + "pants-backend-kustomize>=0.2" ] readme = "README.md" diff --git a/pants-plugins/secrets/BUILD b/pants-plugins/secrets/BUILD index bf42ab7..59f2a63 100644 --- a/pants-plugins/secrets/BUILD +++ b/pants-plugins/secrets/BUILD @@ -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", diff --git a/pants-plugins/secrets/CHANGELOG.md b/pants-plugins/secrets/CHANGELOG.md index 7a7ffed..c5bed9c 100644 --- a/pants-plugins/secrets/CHANGELOG.md +++ b/pants-plugins/secrets/CHANGELOG.md @@ -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 diff --git a/pants-plugins/secrets/pyproject.toml b/pants-plugins/secrets/pyproject.toml index 59e3bc8..4caba7b 100644 --- a/pants-plugins/secrets/pyproject.toml +++ b/pants-plugins/secrets/pyproject.toml @@ -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 = "me@sbg.dev" } ]