Open Naveen-oops opened 9 months ago
@Naveen-oops Thanks for submitting this request!
I came up with an example using commands
that may give you some ideas. If it doesn't suit your needs, then lets continue discussing, since I think there's room to improve the user experience with vars
.
devspace.yaml:
version: v2beta1
name: test-var
pipelines:
dev: |
echo "${ONE}"
echo "${TWO}"
echo "${THREE}"
commands:
test-var: |-
read -p "Can you spell?" spell
if [ "$spell" = "yes" ]; then
read -p "Spell 1?" one
read -p "Spell 2?" two
read -p "Spell 3?" three
devspace dev --var ONE=$one --var TWO=$two --var THREE=$three
else
devspace dev --var ONE=one --var TWO=two --var THREE=three
fi
output
❯ devspace run test-var
Can you spell?yes
Spell 1?eins
Spell 2?zwei
Spell 3?drei
info Using namespace 'loft'
info Using kube context 'kind-kind'
eins
zwei
drei
❯ devspace run test-var
Can you spell?no
info Using namespace 'loft'
info Using kube context 'kind-kind'
one
two
three
Thanks @lizardruss for your reply.
Yeah, the example you gave is helping, I can implement my use case with the help of that.
My suggestion would be instead of read, if we have any utility POSIX function exposed outside for accessing VAR functionality of devspace, it would be even good. Because the color , theme , and options provided by VAR will increase user experience.
Is your feature request related to a problem?
Problem Description
Scenario and expectation when I run the command
devspace run-pipeline install
, I would like to first ask the question where to install?Current Behavior and Need for Clarity
Additional Context
Which solution do you suggest?
Which alternative solutions exist?
At present, exploring alternative methods to handle user interaction within the pipeline, considering different variable-based approaches and command sequencing.
I'd greatly appreciate any guidance, insights, or suggestions on how to achieve more structured control over the interactive input sequence within the pipeline command.
Thank you for your attention and support in addressing this matter.