git - Is there an alternative to a "push" hook? -


bitbucket, github , other services tend have "push" hook, when push code repository, service can hit url (possible on production server), telling pull latest code.

the problem is, if have number of servers in cloud (which come in , out based on load), not have way of knowing how many servers in cloud @ given time, cannot configure urls "push" to. there alternative way?

is there way instead have production servers hit url on github, bitbucket etc, , check if need update ? not specific 1 service, because imagine if 1 service has of them will. don't know "feature" called.

the push event of github webhook allows repository server (github) contact repository clients (your servers in cloud)

but if doesn't work, have 2 approaches:

  • have 1 dedicated repo client (one dedicated server of yours) contacted github webhook, , know servers on cloud available , need contacted.
  • or switch pull approach server on cloud periodically git pull, followed git push bare repo (still on same cloud server): post-receive hook on bare repo can triggered if git push pushed @ (as mentioned in comments of "how execute command right after fetch or pull command in git?").

Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -