Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Teamcity after git force push

Tags:

git

teamcity

I've had to revert to a previous commit in my master branch in git which has meant I've had to force push the changes up to Teamcity.

It's seems as though Teamcity has got into a bind and it thinks that any newly triggered builds are actually building an older version of the project (it's correct, I reverted from Build Number 750 to 747)

When running the build it displays this:

enter image description here

When I look in the history it looks like this (all builds after I reverted are grey)

enter image description here

Is there anything I can do to make Teamcity think I am building the latest? Maybe clearing logs or something similar?

like image 310
Mark Walsh Avatar asked Sep 17 '14 10:09

Mark Walsh


2 Answers

You could always delete the builds for the reverted commits that no longer exist. To do this go to the build details page then click "Actions" > "Remove".

like image 133
Castrohenge Avatar answered Oct 02 '22 18:10

Castrohenge


In a more recent version of TeamCity (9.1.3), we managed to get around this by triggering a custom build with the following parameters:

  1. Changes tab: Include changes: Select the latest commit explicitly, instead of "latest changes..."
  2. Dependencies tab: Tick the checkbox for "rebuild all snapshots transitively". This just makes all dependencies change from auto to rebuild. (This only applies if you have dependences, of course.)
like image 33
Haugholt Avatar answered Oct 02 '22 18:10

Haugholt