TFS build agents don't satisfy tge demands - tfs

I upgraded tfs to 2018.2 and i added a phase in my build to run ui tests. The build failed because "no agent found in the pool which satisfy the specified demands: oldMachines, vstest, agent.version -gtVersion 2.103.0". My agents have vstest and their version is 2.122.1, and when i try to use these agents in another release it succeeded to run the ui tests.

Related

How to make Jenkins job not to fail upon post-build actions failures?

There is great build-name-setter-plugin for Jenkins, but in my instance it has staility issue over dependency version marking some builds as failed
IllegalStateException (Build step 'Changes build name' marked build as failure), while actual build is SUCCESS #62
https://github.com/jenkinsci/build-name-setter-plugin/issues/62
I cannot upgrade Jenkins or plugins right now.
How to make Jenkins job not to fail upon post-build actions failures?
It would be better build name not changed occasionally, than making build as failures while code is OK.

How to run the Automated testcases from the TestPlan in AzureDevops

I am pretty new to Azure Devops. Currently i am trying to run The Automated Selenium (C#) testcases from Test Plans in Azure Devops.
I am referring to the following link to set up the Release Plan to Run Automated Tests from Test Plan
https://learn.microsoft.com/en-us/azure/devops/test/run-automated-tests-from-test-hub?view=azure-devops
I am able to link the Release Pipeline with the testplan and execute the test by creating a new Release. But when the testcases are executed from testplan, Below error is displayed. Its able to identify the Automated test. But in the second stage (Validating Stage) below error is displayed.
The error:
Validating stage:The selected stage does not have the right version or
settings of the Visual Studio Test task to run tests.
Steps Followed:
Created a TestPlan under TestPlan in Azure Devops
Added the testsuite and the testcases. Associated the Automated testscripts with the testcase.
Created a Release Plan from the Run automated tests from Test Manager template.
Task Added to the Release Pipeline:
Visual Studio Test Task
Configuration of Visual Studio Test Task:
Select tests using: TestPlan
Test suite: Autopopulated the Tetplan to which the Release Plan is linked
Test configuration: 1 - Windows 10 (default value)
Search folder: $(Agent.ReleaseDirectory)
The Build Artifacts for the Build Pipelines publish the Build artifacts in the $(Agent.ReleaseDirectory) folder.
Agent Used: Self Hosted Agent.
To run the automated testSripts by selecting the test cases from Test Plan.
Follow the instructions here https://learn.microsoft.com/en-us/azure/devops/test/run-automated-tests-from-test-hub?view=azure-devops
Note: For Visual Studio Test Task in release pipeline, Under the test
selection group, for Select test using option, select "Test run" by
default Test Assembies are selected
The documentation indicates you should verify that Select tests using is set to Test run. You can modify the setting and try again.

Continuous Integration build over TFS2017

I would like to know what is the equivalent of "Continuous Integration - build each check-in" (XAML definition) in VNext definitions.
1- Is it "Run continuous integration triggers for commited changes" in Gated trigger?
2-Or it is a "Continuous Integration trigger with batch changes checked" in build definition.
I ask this question because I was not able to launch a CI build after successfully Gated Check-in. My CI build does different steps than Gated.
I'm over TFS 2017 (15.117.27414.0).
The equivalent of "Continuous Integration - build each check-in" (XAML definition) in VNext definitions is Continuous Integration trigger:
Enable CI trigger if you want the build to run whenever someone checks
in code.
Select Batch changes check box if you have a lot of team members
uploading changes often and you want to reduce the number of builds
you are running. If you select this option, when a build is running,
the system waits until the build is completed and then queues another
build of all changes that have not yet been built.
Select the version control paths you want to include and exclude. In
most cases, you should make sure that these filters are consistent
with your TFVC mappings on the Repository tab.
You can get more details in the link below:
https://learn.microsoft.com/en-us/vsts/build-release/concepts/definitions/build/triggers?view=vsts

TFS 2015 Gated Build is creating a Build and Triggering Release Job

We are working on TFS 2015 Update 1
The same Job is triggering CI / Gated / Scheduled Build
I want CI/Scheduled build to Publish Artifact
Unable to find a way to disable Build Step Dynamically
I am calling a Powershell Script before 'Publish Build Artifact' Step and trying to find a solution to access the next Step and Set it to 'Skip'
But I have seen even when the Drop folder is empty, the Release (CI/CD) triggers as the Gated Job is creating a Build
Is there a way to avoid Gated Job to create a Build
or to avoid Release Job to trigger in case of Gated Build
In TFS 2015 update 1 I think you're way too far behind. There are solutions for later versions. In your case, you'd need a separate Build Definition for the gated build and if my memory serves me right, you don't have the task group option yet. Task Groups were introduced in TFS 2017, they would at least allow you to share process and variables between separate build definitions.
You're on an unsupported TFS version, in any case, TFS 2015 update 1 was replaced by TFS 2015 update 3.1 any versions between TFS 2015.0 and 2015.3.1 are unsupported and TFS 2015 update 1 contains a number of XSS security vulnerabilities that were fixed in TFS 2015.3.1 as well as in TFS 2017.0.1, 2017.3.1 and 2018.1. This would be a good time to upgrade and make the jump.
In TFS 2018 this would be possible with an artefact tag filter:
Prevent Release Trigger on Gated Check-in build
One option that remains available is to turn off the CI trigger of the release workflow and then from a powershell script, conditionally trigger the release from the build.

Determine Current Visual Studio 2013 Test Agent Version

We are using TFS 2015 and we are trying to run build definition on a remote server with a test agent.
TFS complains that our test agent version is too old:
No agent found in pool 1 which satisfies the specified demands:
Agent.Version -gtVersion 1.94.0
The question is: how can you tell the current version of the agent?
You can see it on the Agent pools pagein TFS under Capabilities.

Resources