API - Creating deployment triggers

janheussner
PRO

18 days ago

Thank u for this great example and it works very well :)

https://github.com/brody192/railway_project_create/blob/main/main.py

I have one thing i don't really understand:

Why do i need to execute this: create_deployment_triggers?

What is the "deploymentTriggerCreate" doing? What happens if i do not create it? For me its a little bit confusing to see in the UI what the difference is. Can I see this somewhere or is this forwarded to github? But there I can also not see something.

Would be very cool if you could clarify what this function is doing?

Would it mean that if i will not execute is, so it will never be updated from github?

In my case i have two services:

  • A postgres db

  • and a private github repo with a Dockerfile which has to updated when the code changes.

Solved

6 Replies

Railway
BOT

18 days ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


18 days ago

Would it mean that if i will not execute is, so it will never be updated from github?

Yes, as we use that in our API to create a watcher to GitHub so that we can do further deployments. Any hesitation to calling it?


Status changed to Awaiting User Response Railway 18 days ago


janheussner
PRO

17 days ago

Thank you for clarifing. No not really it is fine for me to calling it.

But I would like to see it in the railway ui somewhere.

If I execute it with and without i cannot see any difference for the services. In both cases there is written: "Updates will be pulled from the latest commit on this GitHub branch."

Or do I miss something?


Status changed to Awaiting Railway Response Railway 17 days ago


17 days ago

Hello,

The change is not visible in the UI.

Calling that function just adds rows to our database so that when you push to the applicable repo, auto deploys will be triggered.

So without calling that, despite the UI saying that updates will be pulled from the latest commit, nothing will be pulled from the latest commit automatically.

I should also note that the function only applies to services that deploy from GitHub, there's no way to have an image auto deploy when a new version is published.


Status changed to Awaiting User Response Railway 17 days ago


janheussner
PRO

17 days ago

Okay well got it Thanks brody !

Means i need to check over API if i want to be sure - thats okay for me for now even though i don't like it .


Status changed to Awaiting Railway Response Railway 17 days ago


17 days ago

No problem!


Status changed to Awaiting User Response Railway 17 days ago


Status changed to Solved brody 17 days ago