Mark Walsh
Mark Walsh

Reputation: 3361

Teamcity after git force push

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?

Upvotes: 12

Views: 1761

Answers (2)

Haugholt
Haugholt

Reputation: 887

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.)

Upvotes: 1

Castrohenge
Castrohenge

Reputation: 8983

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".

Upvotes: 7

Related Questions