1

I am planning to do below

Copy from git repository to a Windows machine each time a commit/ update is made to that folder only. May be something like Jenkins can be used for same but unable to determine how can I do it?

  1. Check commit made to repo ( this I have done)
  2. As soon as commit is made to repo, trigger a jenkins job that will update this change to a windows server ( How to do this?)
AskQues
  • 11
  • 1

1 Answers1

0

If the repository is local, it would be easier to push directly to the Windows machine, assuming it has an SSH server (which Windows 10 2019.09 and more now have)

If the repository is distant, you can configure a webhook in order to call a Jenkins server for a specific job.
See for instance "Triggering a Jenkins build every time changes are pushed to a Git branch on GitHub" by David Luet

Or you can define a Jenkins pipeline that GitLab-CI can execute.

In both cases, your Jenkins job will have to copy the checked out repository.
I would use git bundle to compress the repository into one file (or a simple tar), copy it over the Windows server, and decompress there.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • hey Thanks, I am done until pipeline but the query was actually how to copy the checked out repo to Win machine – AskQues May 20 '20 at 08:13
  • @AskQues If the Win machine is a Jenkins agent, your pipeline can bundle the checkoed out repo (done by Jenkins in its dedicated workspace), copy the bundle to the target folder, and clone/pull from it – VonC May 20 '20 at 10:35