I'm trying to use Git to manage a product installed on many Windows servers. Here is the current status:
- Every client has pulled the repository and is on the
master
branch,
- Servers are always on and connected to the Internet,
- I have full access (the administrator) to the servers but some other guys (out of my company) has access too, so I should be careful with credentials such as SSH keys,
- Product source code is small (not more than 5MB).
And the following is what I'm trying to achieve when I (as developer) push commits to master
branch on the Git server:
- All the Windows servers automatically pull new commits and update their copy to the latest version,
- Execute some scripts (to restart some services, run tests, etc.),
- Log the entire updating process,
- The server report it's current status (Git commit, tag, and branch) to a remote server so I can check the status of all servers after each push.
What are my options? Is there any software or I have to build my own? I checked Git hooks but it seems they trigger after I manually pull code on each server.
Heres an idea,
- Designate one of the servers as a Jenkins server
- Set up the rest of the servers as Slaves/ Agents
Heres the working process
- You commit an executable file (.sh .bat .exe)
- Jenkins notices the commit and runs the file on all the machines
- The Agent executes the commands while logging the terminal in Jenkins
- Jenkins tells you if your build succeeded or failed
If you would like to try this strategy I would be glad to help
Plus Jenkins is a web app so you can access it from many devices!