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
28 stars 17 forks source link

Optionally check-in changes based on build variable value #79

Closed icnocop closed 5 years ago

icnocop commented 5 years ago

Hi.

Thank you for TFS TFVC tasks.

I would like to request the ability to check-in changes based on a build variable.

For example, I would like to set a build variable at queue time to indicate whether or not to check-in changes.

If the build variable is set to true, then the "TFVC - Check-in changes" step will check-in changes. If the build variable is set to false, then the "TFVC - Check-in changes" step will not check-in changes.

This is helpful when I want to optionally check-in a shelveset with a build.

I'm using TFS 2015 Update 4 where conditions can't be set on a build step.

Since this only affects users using an older version of TFS, I'm willing to re-use an existing variable like ConfirmUnderstand (if possible), but even if that variable is set to false, the TFVC task still checks-in changes according to https://github.com/jessehouwing/vsts-tfvc-tasks/issues/64.

Thank you.

jessehouwing commented 5 years ago

I'm very hesitant to add this given conditionals exist in tfs 2017 and up.

On Thu, 28 Feb 2019, 01:16 Rami, notifications@github.com wrote:

Hi.

Thank you for TFS TFVC tasks.

I would like to request the ability to check-in changes based on a build variable.

For example, I would like to set a build variable at queue time to indicate whether or not to check-in changes.

If the build variable is set to true, then the "TFVC - Check-in changes" step will check-in changes. If the build variable is set to false, then the "TFVC - Check-in changes" step will not check-in changes.

This is helpful when I want to optionally check-in a shelveset with a build.

I've using TFS 2015 Update 4 where conditions can't be set on a build step.

Since this only affects users using an older version of TFS, I'm willing to re-use an existing variable like ConfirmUnderstand, but even if that variable is set to false, the TFVC task still checks-in changes according to #64 https://github.com/jessehouwing/vsts-tfvc-tasks/issues/64.

Thank you.

— 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/79, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uSwW_Z8vEAc7K8QlSgJ_KgaV8FESqks5vRx_BgaJpZM4bVuwf .

icnocop commented 5 years ago

I understand and thanks for your consideration.

I was able to use a PowerShell task to abort the build on a condition before the check in step.