The Kraken standard library.
Project description
kraken-std
The Kraken standard library.
Features
Cargo
Build Rust projects with Cargo.
Features
- Inject HTTP(S) Basic-auth credentials into Git clone and Cargo download requests in
cargo build
for compatibility with private registries (workaround until rust-lang/cargo#10592 is working and merged).
Quickstart
# .kraken.py
from kraken.std.cargo import cargo_build, cargo_publish, cargo_settings
settings = cargo_settings()
settings.add_auth("example.jfrog.io", "me@example.org", "<API_TOKEN>")
settings.add_registry(
"private-repo",
"https://example.jfrog.io/artifactory/git/default-cargo-local.git",
publish_token="Bearer ${PASSWORD}",
)
cargo_build()
cargo_publish(registry="private-repo")
Note
- The registry URL configured in the Kraken build script is currently written only temporarily into the
.cargo/config.toml
configuration file. In a future version, we may permanently write it into the file to keep it synchronized or instead pick up the configured registries by reading the configuration file instead.
Integration tests
The cargo_publish()
and cargo_build()
tasks are continuously integration tested against JFrog Artifactory
and Cloudsmith.
Docker
Build and publish Docker images.
Supported backends
- Native Docker (currently does not perform auth for you)
- Buildx (currently does not perform auth for you)
- Kaniko
Quickstart
# .kraken.py
from kraken.std.docker import build_docker_image
build_docker_image(
name="buildDocker",
dockerfile="docker/release.Dockerfile",
tags=["kraken-example"],
load=True,
)
Integration tests
The build_docker_image()
function for Buildx and Kaniko are continuously integration tested to ensure that build
time secrets under /run/secrets
don't appear in the final image.
Helm
Package and publish Helm charts to OCI or HTTP(S) registries.
Quickstart
# .kraken.py
from kraken.std.helm import helm_push, helm_package, helm_settings
helm_settings().add_auth("example.jfrog.io", "me@example.org", "api_token")
package = helm_package(chart_path="./my-helm-chart")
helm_push(chart_tarball=package.chart_tarball, registry="example.jfrog.io/helm-local", tag)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kraken-std-0.1.9.tar.gz
(21.4 kB
view hashes)
Built Distribution
kraken_std-0.1.9-py3-none-any.whl
(27.2 kB
view hashes)
Close
Hashes for kraken_std-0.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1884842573fd6ce0c810cd73f4bb8b7c6b6bf11d376831e04ea4371576e0209a |
|
MD5 | c4ff03c712bd68fd1eb1b4fb3bd35007 |
|
BLAKE2b-256 | 12baed8017146642eadfdf1b2dd106b9642a47d6b2cab35bd54ac759a25a30e4 |