We are using TeamCity to build our solution, and to run integration tests.
We use the TC plugin to create and deploy the release to a test environment where we run the integration test suite.
If all the tests pass we then want to promote that to the next server for manual acceptance testing by the client. We do that with another Octo build step at the end, after the tests pass, that promotes the build to the next server.
The problem is that while the TC plugin uses the line:
##teamcity[setParameter name=‘octo.releaseNumber’ value=‘4.18.5025.17235’]
to set the release number, it only does that when a new release is generated. If the release has already been deployed (which can happen when it is the integration suite that has changed - the production code hasn’t changed) then it does not set that parameter.
Since we don’t know what the release number is we can’t use it in a later step to run the promote.
As I see it there are two ways fix this:
Allow the promote step to take an empty release number which means ‘promote most recent’ - or a safer option might be to create a new switch so that nothing existing is broken.
Set the octo.releaseNumber value every time. Octo does know it.
For the moment we are hard coding a build number - but this doesn’t match the release number in the assembly. [Hmm, I guess I could deploy the integration test project to a dummy folder to force a new build number from Octo…]
Of course there may be another way…?
Thanks in advance