-
Notifications
You must be signed in to change notification settings - Fork 243
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
Support environment variables in command #3537
Support environment variables in command #3537
Conversation
Signed-off-by: Stephanie <stephanie.cao@ibm.com>
Signed-off-by: Stephanie <stephanie.cao@ibm.com>
Signed-off-by: Stephanie <stephanie.cao@ibm.com>
Codecov Report
@@ Coverage Diff @@
## master #3537 +/- ##
==========================================
+ Coverage 45.94% 46.00% +0.06%
==========================================
Files 114 114
Lines 11584 11598 +14
==========================================
+ Hits 5322 5336 +14
Misses 5745 5745
Partials 517 517
Continue to review full report at Codecov.
|
tests/examples/source/devfiles/nodejs/devfile-with-multiple-defaults.yaml
Show resolved
Hide resolved
@yangcao77 can you please also share a working example of this that would help test the functionality of this PR? If it's already there at some place (code/issue), please point me to it. |
AFAICS, there's not make target by the specified name. I hope I'm not doing something really stupid here. 😢
$ git checkout upstream/pr/3537
Previous HEAD position was f7c51a7b0 Refactor odo delete logic
HEAD is now at 9b7cc15dc Merge branch 'master' of github.com:openshift/odo into 3406-environmentVariable
$ make test-push-devfile-test
make: *** No rule to make target 'test-push-devfile-test'. Stop.
$ git log --oneline -n7
9b7cc15dc (HEAD, upstream/pr/3537) Merge branch 'master' of github.com:openshift/odo into 3406-environmentVariable
4d69aab92 added deprecation and error messages for 'odo update' (#3453)
8791263cf Fixing kubeconfig path and login session for 4.x cluster (#3528)
72b44d7bb Adds a error message for creation of routes with host flag (#3541)
c7d7fcb16 Update odo delete for no component and devfile.yaml (#3405)
42fe69318 used MatchJSON in tests wherever needed (#3523)
941bcf83b catalog search services honor experiment flag (#3366)
$ make && cp -f odo ~/bin
go build -ldflags="-w -X github.com/openshift/odo/pkg/version.GITCOMMIT=9b7cc15dc" cmd/odo/odo.go
$ make test-push-devfile-test
make: *** No rule to make target 'test-push-devfile-test'. Stop |
@yangcao77 I think this should be |
Signed-off-by: Stephanie <stephanie.cao@ibm.com>
@dharmit Sorry for the confusion, it should be Also updated the manual test in the PR description if you want to try it manually. |
wantErr: false, | ||
}, | ||
{ | ||
name: "Case: custom command with multiple environment variable", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add cases for the debug commands as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
Signed-off-by: Stephanie <stephanie.cao@ibm.com>
/retest |
Signed-off-by: Stephanie <stephanie.cao@ibm.com>
/retest Please review the full test history for this PR and help us cut down flakes. |
23 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@mik-dass Can you help add back the lgtm label? I had to rebase to pull in the fix for the flaky test. |
Sure. |
What type of PR is this?
/kind user-story
/area devfile
What does does this PR do / why we need it:
This PR allows to specify environment variables in a command in the devfile so that the environment variables are used when executing the command.
Which issue(s) this PR fixes:
Fixes #3406
How to test changes / Special notes to the reviewer:
automation:
run
make test-cmd-devfile-push
manual:
Use the devfile.yaml within this PR:
devfile-with-multiple-defaults.yaml
run
odo create
andodo push --build-command firstbuild --run-command singleenv
kubectl exec -it <pod> ls /projects/nodejs-web-app/
should seetest_env_variable
directory exist