bored-soccer-37961
10/19/2023, 3:02 PMshell_command
supposed to be cached? I'm trying to build a UI and package it into a docker container. It seems like like the shell_command
is being re-run every time I run pants package
even though the dependencies have not changed.
BUILD file setup looks like:
files(name="sources", sources=[".", "*", "*/**"])
shell_command(
name="build",
command="pnpm install && npm run build",
tools=[
"pnpm", "npm", "node", "rm", "mv", "mkdir", "cp", "ln", "sed", "sh", "bash", "env", "dirname",],
extra_env_vars=["CODEARTIFACT_AUTH_TOKEN", "BUILD_PATH=./dist"],
execution_dependencies=[":sources"],
output_files=["package.json", ".env", ".nginx.conf"],
output_directories=["conf", "bin", "dist"],
timeout=3000,
root_output_directory=".",
)
docker_image(
name="ui",
dependencies=[
":build",
],
)
broad-processor-92400
10/20/2023, 12:01 AMbored-soccer-37961
10/26/2023, 1:52 AMpython-repos
if I have a token in there that's coming from an environment variable? That would explain why my dependency pex files are rebuilt in every CI run.
Any tips for working around that? Unfortunately Code Artifact limits the token ttl to 12 hoursbroad-processor-92400
10/26/2023, 1:54 AMbored-soccer-37961
10/26/2023, 1:58 AM