jessehouwing / azure-pipelines-tfvc-tasks

Azure Pipelines tasks for Team Foundation Version Control
https://marketplace.visualstudio.com/items?itemName=jessehouwing.jessehouwing-vsts-tfvc-tasks
MIT License
27 stars 18 forks source link

Running similar commands without deploying a task #65

Closed mattp65 closed 6 years ago

mattp65 commented 6 years ago

I'm looking to use a modifed version of these tasks in a build, but want to avoid the overhead of deploying and maintining a seperate "task" in the marketplace. There doesn't seem to be an easy path to porting these calls to a non-Task model though and I can't seem to find anything to realy documents running these from within a build.

I have tried putting the code into .PS1 files deployed inside a scripts folder and they run into all sorts of problems in loading the included modules and then connecting to the provider. I finally got the modules to load, but $distributedTaskContext isn't being set, so the connection won't work properly.

Do you have any guidance here? I can do this as a task, but long term, that is a lot more maintenance and requires more steps for someone to modify if needed. It seems like the functions being invovked have been replaced by something newer, but I can't find any reference to the replacements.

jessehouwing commented 6 years ago

I'd suggest calling tf.exe, that's way easier.

On Mon, 18 Jun 2018, 19:49 Matt Parks, notifications@github.com wrote:

I'm looking to use a modifed version of these tasks in a build, but want to avoid the overhead of deploying and maintining a seperate "task" in the marketplace. There doesn't seem to be an easy path to porting these calls to a non-Task model though and I can't seem to find anything to realy documents running these from within a build.

I have tried putting the code into .PS1 files deployed inside a scripts folder and they run into all sorts of problems in loading the included modules and then connecting to the provider. I finally got the modules to load, but $distributedTaskContext isn't being set, so the connection won't work properly.

Do you have any guidance here? I can do this as a task, but long term, that is a lot more maintenance and requires more steps for someone to modify if needed. It seems like the functions being invovked have been replaced by something newer, but I can't find any reference to the replacements.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/65, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uS6Z9KwPvUUEj8WN-xhIToxCQcZgPks5t9-g6gaJpZM4UsM7x .