[CLI] How can I know if an environment already exists?

To know if I need to create a Preview Environment or if I can delete it, I need to check if it already exists from our CI.
To do so, I grep the environment name from qovery environment list.

ISSUE

qovery environment list needs a context to list the environments.

I tried to pass the following arguments: qovery environment list --organization my_org --project WebApp but I still need a context following that error:

Run qovery environment list --organization my_org --project WebApp
Error: Current environment has not been selected. Please, use 'qovery context set' to set up Qovery context.

qovery context set doesn’t take any arguments to specify the organization and the project.

Is there a way to list the environments without a context or to set a context from a CI?

Hey @jmeiss,

Indeed context command doesn’t take into account any arguments as of now. I think it can be added because it makes sense.

Do you mind opening an issue asking to support it here and paste issue link in this thread?

We will try to prioritize it asap.

Thanks :slight_smile:

2 Likes

Thanks for reporting this issue :pray: Here is a fix that is going to be merged ASAP :slight_smile:

@jmeiss v0.58.10 fixes your issue. Thank you again for taking the time to report this issue :blush:

1 Like

It works great! Thanks for the quick fix :pray:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.