TFS 2017 Release triggered after a while - tfs

We have a TFS CI build which builds successfully but the release does not trigger automatically but instead, it triggers after a while. all the settings look correct.
Any suggestions?

Related

tfs 2019 Pipeline Builds Triggers only trigger if a new check-in has happened

In on prem TFS 2019, I have builds that we have triggers to happen on a schedule meaning they always build at specified times during the day. What I would like to do is to not start a build if a check-in hasn't happened since the last build ran. If no check-in has happened, we really don't have a reason to build and push new code since the code hasn't changed.
By default, your pipeline does not run as scheduled if there have been no code changes since the last scheduled run.
Make sure you select Only schedule builds if the source or pipeline has changed in your Pipeline:
Or not use the always keyword in YAML build:
https://learn.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops&tabs=yaml#running-even-when-there-are-no-code-changes

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.

TFS 2015 vNext Gated Check-in builds are "Waiting for an agent to be requested"?

We are trying to use TFS 2015 Gated Builds. The trigger hooks in correctly, and the build gets created, but it never gets picked up by any agent. Non-gated builds start fine, and if we manually restart the gated build, that runs fine too. But the gated build (the important one), just sits there saying "Waiting for an agent to be requested" and "Waiting for an available agent":
No logs get created in the _diag folder for these builds.
EDIT: Added screncap of agent:
Check the table tbl_BuildAgent in TFS project collection database. Sometimes an agent entry may be causing this issue.

Personal builds (pre-test commits) using TFS and Jenkins

Is it possible to trigger personal builds using TFS and Jenkins? Similar to what can be achieved using Teamcity. Can a developer trigger a build without checking-in so that his/her changes can be tested before checkin?
thanks,
You can do this with TFS. Assuming you are using TFS Build, available in TFS 2015 and in VSTS, and your source control is Git, you can setup a build policy for a specific branch that triggers a build any time a pull request happens. Details here.
If you are using the older XAML builds, look at Gated Checkins.

On Premise Gated Check-in Fails with "The shelveset ... could not be found for check-in"

I am having an issue with the new TFS 2015 Update 2 Gated Builds.
After attempting a check-in the gated build queues just fine, every part of the build is successful until it reaches the last step of "Check in gated changes".
When I look at the log for that step I get:
[Error]The shelveset _Build_5427;Build\ad8fe058-f936-4908-91de-57e7bc6a2f9d could not be found for check-in
When I look at the 'Get Sources' log, I see:
2016-04-01T19:11:12.3062092Z tf get /version:C6213
2016-04-01T19:11:13.2125013Z tf shelve _Build_5427 /replace
2016-04-01T19:11:13.3218610Z Successfully created new shelveset _Build_5427;Domain\BuildServiceUser
I recognize the username as the service user (and have thus redacted it here). It looks like it is trying to find the correct shelveset name, but for the wrong user.
Update 4/20/2016 :
I ended up having to create a brand new project.
The failed reason: your are trying to check in files with your own account. But the build agent try to check in the changes with the service account.
It seems there are something wrong with your build agent. After you update your TFS server to TFS update2, you also need to update your build agent. If still not work , try to download the agent and deploy a new one. Detail steps from MSDN: Deploy a Windows build agent
I experienced this issue using on-premise TFS 2015 Update 2. As a workaround I settled with a regular CI-build instead of the Gated trigger and I scheduled a release buiild nightly.
However, we have recently installed TFS 2015 Update 3 and that solved the issue. We now use the configuration that we wanted: 1 Gated build that checks in the changes and 1 Continuous Integration build for the release.

Resources