-
Notifications
You must be signed in to change notification settings - Fork 244
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
odo deploy
/odo build-images
fails for docker backend
#5322
Comments
/area deploy |
This is the role of `${PROJECT_SOURCE} to append the working directory. The problem is probably because this variable is empty or not expanded correctly |
Yes, the variable is surely not getting expanded. But where is this value Lines 45 to 48 in b20103c
It says |
It comes from the
|
Wow! That feels like an embarrassing question that I asked. 😆 Shouldn't this variable be defined in the devfile at: https://github.com/kadel/devfile-nodejs-deploy/blob/2b7058af5cdac5a43ded2b6c44454add7cf82161/devfile.yaml#L6-L8 Is this devfile invalid/erroneous in that case? |
I'm not sure. @kadel, where is this variable |
This is a predefined env variable. Odo is automatically adding it to containers. From devfile spec:
|
before odo executes |
…ironment (#5602) * Add test in `odo build-images` highlighting the issue * Add test in `odo deploy` highlighting the issue * Add `PROJECT_SOURCE` env var to the image build command This way, it will get expanded by the shell. NOTE: This will still not work on Windows, but #5588 should fix that other issue.
…uild command environment (redhat-developer#5602) * Add test in `odo build-images` highlighting the issue * Add test in `odo deploy` highlighting the issue * Add `PROJECT_SOURCE` env var to the image build command This way, it will get expanded by the shell. NOTE: This will still not work on Windows, but redhat-developer#5588 should fix that other issue.
/kind bug
What versions of software are you using?
Operating System: Fedora 35
Output of
odo version
:main
How did you run odo exactly?
Actual behavior
Expected behavior
Both commands should pass
Any logs, error output, etc?
The
docker build
command that's generated by odo is:docker build -t "quay.io/dharmit_rh/devfile-nodejs-deploy:latest" -f "/home/dshah/src/devfile-nodejs-deploy/Dockerfile" ${PROJECT_SOURCE}
Appending above command with a
.
(period) or path to the directory containing the devfile (devfilePath
) in the function below solves the issue.odo/pkg/devfile/image/docker_compatible.go
Line 46 in b20103c
The text was updated successfully, but these errors were encountered: