-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.13: [Bug]: When using templates, file added by copyFrom are excluded from the build context #5201
Comments
To clarify, copyFrom does work for .txt files, but the Dockerfile does not work with a local-kubernetes provider. I suspect that the dockerfile is expected to be present before the copyFrom takes place. fun fact: If you switch to remote kubernetse and kaniko to build, everything works fine as the timing of a container build in that situation is different. |
In the container and jib-container build actions, we checked for the existance of files checked in to version control for certain checks. Garden allows for files to be injected into the build action dynamically at run time, e.g. by using `copyFrom` and `generateFiles`. We want to check for actual presence of files in the action's build directory instead of checking for the files that are included from version control. Fixes #5201
In the container and jib-container build actions, we checked for the existance of files checked in to version control for certain checks. Garden allows for files to be injected into the build action dynamically at run time, e.g. by using `copyFrom` and `generateFiles`. We want to check for actual presence of files in the action's build directory instead of checking for the files that are included from version control. Fixes #5201
I was able to reproduce this issue with the following kind: Build
type: exec
name: generate-dockerfile
spec:
command: [sh, -c, "echo FROM scratch > Dockerfile.dev"]
---
kind: Build
type: container
name: test
description: test
dependencies:
- build.generate-dockerfile
copyFrom:
- build: generate-dockerfile
sourcePath: ./Dockerfile.dev
targetPath: ./Dockerfile.dev
spec:
dockerfile: ./Dockerfile.dev Unfortunately, for |
In the container and jib-container build actions, we checked for the existance of files checked in to version control for certain checks. Garden allows for files to be injected into the build action dynamically at run time, e.g. by using `copyFrom` and `generateFiles`. We want to check for actual presence of files in the action's build directory instead of checking for the files that are included from version control. Fixes #5201
Garden Bonsai (0.13) Bug
Current Behavior
A user is trying to create a template + an exec action to dynamically use a dev Dockerfile (see below).
When trying to build the following templated build action:
Garden will throw the following error:
NOTE: the
Dockerfile.dev
file is correctly found in the.garden/build
directory for the action.Expected behavior
Garden should take into consideration all the files in the action folder in the build context and successfully build the container using the
Dockerfile.dev
file.Reproducible example
Please find the full repo below:
repro.zip
Workaround
There is no workaround at the moment. Additionally, the flow the user is trying to implement is a workaround in itself, to overcome the removal of the old
generateFiles
property of Modules (0.12).Suggested solution(s)
Additional context
Your environment
garden version
:edge
The text was updated successfully, but these errors were encountered: