brave-hair-402
06/15/2024, 9:55 PMpython_sources()
resources(name="cdk_file", sources=["cdk.json"])
pex_binary(
name="my-cdk-app-cdk",
entry_point="app.py",
execution_mode="venv",
venv_site_packages_copies=True,
dependencies=[
":cdk_file",
"src/my_app/api_lambda:api_lambda",
],
)
careful-address-89803
06/15/2024, 11:29 PMpants package
as a dependency.
If I understand your usecase correctly: your pex_binary is IAC (using CDK) that deploys resources in AWS which reference docker containers that are also built by Pants. You'd like it that when you run the script, Pants will package
(and publish
?) the docker targetsbrave-hair-402
06/16/2024, 1:18 PMbroad-processor-92400
06/17/2024, 12:32 AMpants pcakage
(and/or publish
itself) internally. It's not super great... but might work for this? Something like running pants package path/to:my-cdk-app-cdk && dist/path.to/my-cdk-app-cdk.pex
careful-address-89803
06/17/2024, 2:15 AMexperimental-deploy
goal has the concept of "publish_dependencies" for targets to publish before running the deployment. The helm backend does this for identified docker containers. I imagine we could do something like the adhoc backend but for the experimental-deploy
, which would run an arbitrary `run`able...