0

Salt stack is being used with bit bucket. There are 2-3 of us who push updates to it occasionaly. I was wondering is there a way where salt stack can get the latest changes from bit bucket then highstate? If so, how would you go about doing it?

Jeff Bauer
  • 13,890
  • 9
  • 51
  • 73
py_newbie
  • 30
  • 1
  • 5

2 Answers2

0

Set up a webhook in BitBucket to call salt-api to do a salt-run fileserver.update followed by a state.highstate.

tedski
  • 46
  • 2
0

What you are looking for is the hgfs backend. whenever a state.highstate is called, the master will pull from bitbucket and send it to the minion. A basic configuration would be the following:

fileserver_backend:
  - hg

hgfs_remotes:
  - https://self@bitbucket.org/self/salt

hgfs_branch_method: branches

There is unfortuntaley a lack of documentation about how to configure hgfs so doing anything more advance may require you to dig around. Good luck.

Note for future readers: I am not sure whether the minion or the master pulls from bitbucket.

Jason Zhu
  • 2,194
  • 3
  • 23
  • 27