vtex-apps / store-discussion

VTEX IO store builders' community
80 stars 5 forks source link

Vtex| CICD setup | how to avoid all prompts comes up in vtex commands #683

Open rgangarde opened 2 years ago

rgangarde commented 2 years ago

What are you trying to accomplish? Please describe.
I am trying to setup a CI/CD pipeline for a new VTEX store. For example, I would like to be able to automatically release a new version of an app after a merge to main. I am using Gitlab CI to do same. I want to have 3 stages in CI.

  1. dev-env-deploy 2. staging-env-deploy 3. prod-env-deploy I am using workspace as individual environments to have 3 environements to have CICD way of development.

I am able to login to vtex as a part of CI. Main problem now is, when I run any of below commnds

  1. vtex link
  2. vtex install
  3. vtex publish
  4. vtex deploy

It prompts to enter "Y/N" options, which needs to be avoided in CI/CD. And also, it does not prompt always.

Screenshot 2022-05-24 at 3 07 40 PM

Any idea how to resolve this?

What have you tried so far?
There is --yes flag which can be passed but it is not available for some of the above commands.

Account Workspace
liniomx dev
jpesce commented 1 year ago

How did you work out the login part? Have you tried using the yes command?

touch test.txt && yes | rm -i test.txt

You can also use echo

touch test.txt && echo "y" | rm -i test.txt