TeamCity lifecycle issue

Hey,
We use the TeamCity plugin to deploy to our Dev environments in Octopus. We have just setup lifecycles in 2.6 and have noted some strange behaviour.

We have 3 environments:

Dev
UAT
Staging

We then have 2 lifecycle phases

Limited Environments - Any 1
    Dev
    UAT
Staging
   Staging

In the TeamCity plugin we are using OctopusDeploy: Create Release configured with a release number and deploy to set to “Dev”, additional command line argument --packagesFolder=Temp so it uses the artifact from our build. This setup was taken from a blog post/video Paul did back in version 1.x

We have noticed that if we set the Staging environment to "Deploy automatically to this environment as soon as the release enters this phase. " in the Staging phase, Octopus deploys to both Dev and Staging when the TeamCity build runs.

I’m not sure if this is an issue with the plugin or with the API.

Hi Sean,

Thanks for getting in touch! This is behaving as you have defined in your Lifecycle. Because you successfully deploy to Dev, and your first phase says Any 1, it means that then phase 2 is ‘unlocked’ so then immediately Staging auto-deploys. If you had phase one set to require both Dev and UAT having to be deployed to, then Staging would not trigger the deploy until UAT had also been successfully deployed to.

Hope that helps!
Vanessa

Ah that does make sense now. Thanks Vanessa. We thought the auto deploy option only took effect when a user said move to the next stage.