I have a build plan, that consists of 4 phases. 1st phase builds the project. The next 3 phases wait for build to complete, then start in parallel, each on its own agents, running qa tests, each it's own test suite. The problem is copying the dll generated in phase 1 to the other three phases, as all phases run on its own agents and most variables like System.DefaultWorkingDirectory are agent-scoped.
Asked
Active
Viewed 340 times
0
-
The tests are functional tests? – Shayki Abramczyk May 15 '19 at 18:40
-
Depending what you mean by functional. These are NOT unit tests if that's your question – Razkar May 15 '19 at 18:45
-
Ok, so if it'n not unit test it's recommended to run the test during the release and not in the build step. it's also can solve your issue. – Shayki Abramczyk May 15 '19 at 18:48
-
We tried that, there are issues we face, that are part of another ticket. For now, we just need to copy artifacts inside same build plan, between agents. – Razkar May 15 '19 at 18:51
-
Do you know if the build artifact created by build plan will be shared by VSTest tasks on different agents in release pipeline? – Razkar May 15 '19 at 18:59
-
1) if you want it in build pipeline, you can create a folder that each time the dll's will copy to there, the other agents will take it from there and will test it. 2) in the release pipeline you can define a few environments with different agents and each agent will get the artifacts. – Shayki Abramczyk May 16 '19 at 06:01
-
As others said, copy over to pre-determined location (\$(Build.DefinitionName)\$(Build.BuildNumber)), then have the other agents pick it up and run with it. To help with debugging and finding more variables I create a `Print Env Variables` build step which is a `Batch Script` task, the `Path` value set to `cmd.exe` and arguments to `/c set`. So then all of the environment variables are printed out so I can use them. But from what I read your test task would be best done in a Release Pipeline. They both can be assigned to use the EXACT same agent if you wish if where they run is an issue. – Antebios May 16 '19 at 15:01
-
Does this answer your question? [How to access updated files from job 1 to job 2 azure pipeline](https://stackoverflow.com/questions/63851366/how-to-access-updated-files-from-job-1-to-job-2-azure-pipeline) – Matt Sep 11 '20 at 22:36