0
votes

I have several Team City build configurations which can be simplified to the following:

  • A Test step which is automatically triggered by various commits and runs tests.
  • A Build step which should be manually triggered against a known, specific test pass.

Let's say there are 4 commits that automatically trigger the Test step:

  • commit_1: Fails tests
  • commit_2: Fails tests
  • commit_3: Passes tests
  • commit_4: Passes tests

I want to manually trigger the Build step, with a fresh checkout, explicitly tied to commit_3.

I have tried setting Test as a Snapshot Dependency of Build, but this does not give me any option to specify which "run" of the Test I want to build against.

With an "artifact dependency" I can choose the specific dependent output to build against. How can I use a Snapshot dependency to choose a specific commit to build against?

1

1 Answers

1
votes

Setting test as a Snapshot dependency of Build is correct way of doing this.

After that, when you want to trigger Build, press "..." near Run button, select "Changes" tab and choose proper commit.

Or, the other way around. Navigate to a Test build that you would like to use, use Actions -> Promote and choos the Build build configuration. This will trigger Build with same sources revision as current Test build.