Skip to main content

CDKTF Local Build Construct

A simple construct that runs builds for different languages locally. Currently, it supports: docker. I plan on adding rust (cargo) and node (npm) support as well.

Usage

import { Provider, DockerBuild, DockerizedBuild } from "cdktf-local-build";

// Local Build extends LocalExec which extends from the null provider,
// so if you already have the provider initialized you can skip this step
new Provider(this, "local-build");

new DockerBuild(this, "docker-backend", {
  cwd: "/path/to/project/backend",
  dockerfile: "Dockerfile.backend",
  image: "cdktf/backend:latest",
  push: false, // defaults to true
});

new DockerizedBuild(this, "my-go-backend", {
  cwd: "/path/to/project/backend",
  command: "go build -o /tmp/backend",
  imageHomeDirectory: "/tmp/backend",
  platform: "linux/arm64",
  image: "go-builder-image:latest",
  setUser: true,
});

DockerBuild

Builds a docker image locally.

Options

  • cwd: The working directory to run the command in.
  • dockerfile: The Dockerfile to use.
  • image: The tag to use for the image.
  • push: If true, docker push <tag> is executed after the run.

DockerizedBuild

Build an artifact inside a docker image.

Options

  • cwd: The working directory to run the command in.
  • command: Build command to run int the docker image.
  • image: The tag to use for the building image.
  • imageHomeDirectory: The home directory to use inside the image.
  • platform: The platform to build for (sets docker platform flag).
  • setUser: If true, the user will be set to the current user inside docker.

CrossBuild

Builds a rust binary using cross (cross runs it inside a docker container). Please make sure cross is installed on the host machine by running cargo install cross.

Options

  • arch: The architecture to build for (arm or x86).
  • projectName: The name specified in the Cargo.toml.
  • cwd: The working directory to run the command in.

Metadata

Release files for cdktf-local-build 0.0.112

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cdktf-local-build 0.0.112
File Size Uploaded Provenance Actions
cdktf-local-build-0.0.112.tar.gz 56.1 kB Without provenance Details for cdktf-local-build-0.0.112.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cdktf-local-build 0.0.112
File Interpreter ABI Platform Actions
cdktf_local_build-0.0.112-py3-none-any.whl Python 3 none any Details for cdktf_local_build-0.0.112-py3-none-any.whl

Total release size: 110.9 kB

Release files / cdktf-local-build-0.0.112.tar.gz

Download URL cdktf-local-build-0.0.112.tar.gz
Size 56.1 kB
Tags Source
SHA-256 checksum
How to use checksums
970f0f856c67798f4d3f7b10dc0eac0ef1d2c6db0ae5a046a5eb1586ac1558aa
BLAKE2b-256 checksum
How to use checksums
6d63bbc8da9077defb5602f7ca9ba498c293d7a7240e3caa899d11be2577ae08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / cdktf_local_build-0.0.112-py3-none-any.whl

Download URL cdktf_local_build-0.0.112-py3-none-any.whl
Size 54.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7285bc99efcb8e0aefa03126dd4b456bc22cfc830e3b2a26a6dc05eaf95306ea
BLAKE2b-256 checksum
How to use checksums
4d8f97935649dcde74322a1ca5b8d3673f83c19c61106ab4fb44699a53c28a7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Security for cdktf-local-build 0.0.112

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.

Release history Release notifications | RSS feed

This release

0.0.112 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page