novacaptach / vsts-git-tasks

Build tasks for interacting with Git in Team Foundation Build 2015
MIT License
2 stars 5 forks source link

Can I use this to implement a hook and git push to a mirror? #9

Closed styfle closed 8 years ago

styfle commented 8 years ago

I have my code in VSTS. I want to set a up a hook so that each time someone pushes code into VSTS, it should push the code to a mirror in BitBucket.

Is this possible using your extension?

pascalberger commented 8 years ago

I don't think the current two tasks are of any help for this scenario, since they only rewrite the remote url to contain an OAuth token for accessing the remote on VSTS.

For updating a repo hosted on BitBucket you should be able to achieve this by using a build definition with a CI trigger and a command line task where you push the current branch to BitBucket.

if you're interested in syncing BitBucket back, the Enable Git Remote Access task can be of interest for you since iet allows to write back to the remote repository on VSTS.