Missing environment flag in v3 CLI

Hey! I have been using Railway CLI in CI/CD for a quite a long time. The latest v3 CLI is causing few issues while trying to develop a non-production branch (development). Is there any other flag via which the service can be deployed to other branch?
14 Replies
Percy
Percy2y ago
Project ID: N/A
Mukesh
MukeshOP2y ago
N/A
Mukesh
MukeshOP2y ago
These are the options/flags which are available in the v3 CLI
Mukesh
MukeshOP2y ago
While using v2.1.0, the CLI throws this error but somehow it triggers the deployment
Brody
Brody2y ago
you can do railway environment [OPTIONS] [ENVIRONMENT] to specify an environment before running railway up though i do think that would be useful to add as a flag to up so make a github issue for it if you want
Mukesh
MukeshOP2y ago
the environment changes the current environment of a "linked" railway project. i'm directly using the up command with the RAILWAY_TOKEN passed in the environment variables.
Brody
Brody2y ago
i am unfamiliar with github ci/cd stuff, but there has to be a way for you to be able to run the railway environment command before railway up use && ??
Mukesh
MukeshOP2y ago
the environment command requires you to link the railway project. i have tried running the link command but it is throwing "Project not found!" error. i'm pretty sure the project exists and i have double checked the project id as well
Mukesh
MukeshOP2y ago
Mukesh
MukeshOP2y ago
i have copied the project id via railway dashboard. clicked on the project's page > ctrl + k > copy project id ah! my bad. i have installed the v3 cli few hours ago and i didn't run the login command
Brody
Brody2y ago
yeah was just about to say that, the new cli's errors arent the best it will spit out that error if the call to the api fails, no matter the reason of failure
Mukesh
MukeshOP2y ago
ah gotcha! have changed the github action to run the link command before up command and it works perfectly fine.
Brody
Brody2y ago
awesome, glad you got it sorted
Want results from more Discord servers?
Add your server