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
Project ID:
N/A
N/A
You might find these helpful:
- Railway CLI not working as expected - 409 Conflict Error
- Railway overriding railway.toml builder nixpacks with Dockerfile?
- Unable to push to develop environment from pipeline, only locally?
⚠️ experimental feature
These are the options/flags which are available in the v3 CLI
While using v2.1.0, the CLI throws this error but somehow it triggers the deployment
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 wantthe
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.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 &&
??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 welli 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
commandyeah 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
ah gotcha! have changed the github action to run the
link
command before up
command and it works perfectly fine.awesome, glad you got it sorted