-
Notifications
You must be signed in to change notification settings - Fork 852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.ArtifactsDirectory not set when Build.SyncSources=false #1465
Comments
@abbottbd you shouldn't use |
i am going to close this issue, let us know if you need more help. |
I'm sorry but I that check box is only an option when using TFS GIT. We are using TFVC source control and the check box is not displayed for TFVC, so therefore I must use the variable. |
What's your scenario? What did you run in your build? |
Our scenario is that we have a build that is designed to run all of our 15k unit tests with code coverage, We do not do this during our normal CI (code coverage) because it doubles the CI build time. This build doesn't need to get any sources, it simply picks up the output of the CI build (all the compiled code) and then executes the unit tests. We would like to 'not' have the build download any source control (because it isn't needed) however when we do that the artifacts directory is not set and so build tasks that are designed to use that variable fail. |
@abbottbd try set |
Hi,
Is there an API or similar solution I can use instead of re-implementing that task? |
@klapantius what's your scenario? you want to disable sync source but still have the TFVC workspace? the scenarios we target is either the agent pull source code for you, or you take over the entire get source process. |
hey Ting,
Now I would like to know if you can suggest me a better one. If not, then I think I can live with this solution. |
I'm going to close this one out. The original question has been answered and the follow-up has an associated issue in the vsts-tasks repo. |
@TingluoHuang hi, what if I wanna use yaml and don't use UI at all. How can I set Dont' sync sources to true with yaml only? |
Have you try trouble shooting doc? Yes
Agent version and platform
Version of your agent? 2.127.0
OS of the machine running the agent? Windows Server 2016
VSTS type and version? on-prem TFS 2017 Update 3
What's not working?
System.ArtifactsDirectory is not set when Build.SyncSources is set to 'false'.
A build may want to capture/edit/publish artifacts without getting any source. Consider a build who's job is to run & publish test metrics & data - it doesn't need to get any source because it uses the output of the CI build, however it still needs a place to put all of the data it is going to publish. Artifacts is the natural place for this because it is automatically cleaned. I've checked and it seems the folder 'a' still exists just the variable isn't being set. I've tried both git & TFVC source repos and the behavior is the same.
Agent and Worker's diag log
Logs are located at the
_diag
under agent root folder, agent log prefix withAgent_
, worker log prefix withWorker_
. all sensitive information should already be masked out, please double check before paste here.The text was updated successfully, but these errors were encountered: