RAILWAY_DEPLOYMENT_ID isn't available?
Anonymous
PROOP

2 years ago

It doesn't seem like the RAILWAYDEPLOYMENTID variable is working and according to https://docs.railway.app/reference/variables#railway-provided-variables it should be available. I noticed that it's not a part of the auto completion for railway variables either. Is there no way to get a unique build number of some sorts (or even commit sha) as an environment variable?

11 Replies

Anonymous
PROOP

2 years ago

f3ddaf83-9602-481e-b3e6-4a5786029748


brody
EMPLOYEE

2 years ago

that variable would only be available at runtime since it would change every deployment, it's not available to reference


0xolias
PRO

a year ago

I have a question related to this. Is there any way to enforce a "service dependency", such that when a service redeploys, it triggers a redeployment of another service?


brody
EMPLOYEE

a year ago

theres nothing native to do that, but i am struggling to see how your question related to the original question


0xolias
PRO

a year ago

Hah, good question. I have a scenario where I'd like two services to be "coupled" when redeploying, and ideally, for one service to have access to the other service's RAILWAY_DEPLOYMENT_ID env var value. It doesn't have to be that variable though, just needs to be the same for both services when they redeploy.


0xolias
PRO

a year ago

I suspect this is possible via scripting with the public API, but am looking for a native approach.


0xolias
PRO

a year ago

I'm looking for something like a "service group", where one redeployment trigger will redeploy multiple services.


brody
EMPLOYEE

a year ago

thats not possible with railway natively


brody
EMPLOYEE

a year ago

but a variable that would be the same across all deployments and services in a given environment would be RAILWAY_ENVIRONMENT_ID


0xolias
PRO

a year ago

Got it. Don't think that will work for our use case, but really appreciate the quick response.


brody
EMPLOYEE

a year ago

nope a variable has nothing to do with a service depending on one another


Loading...