Multiple deploys using VSTS tool

I have the same issue, as mentioned here:

I’m deploying to one environment and in the octopus deploy server there’s on channel that can deploy to that environment. Still I get the release deployed 3 times during the build. When we do the deploy manually, then there is no such issue.

Could you please help to solve this?

Hi Tarka, thanks for getting in touch.

Would it be possible for you to provide some screenshots of your build process, please? The VSTS build logs would also be very useful to help us determine where the problem is here.

You mentioned that you don’t get this same issue when deploying manually, is this from the UI or octo.exe?

Shaun Marx

Can I provide logs privately?

These I can provide:

Manual build from UI.

Hi Tarka, thanks for providing that info.

I have created the following location where you can securely upload the logs. We will delete these after we get to the bottom of this.

Could I also ask you to provide some screenshots of the parameter you currently have defined in your Create Octopus Release and Deploy Octopus Release tasks, please? :slight_smile:

Shaun Marx

I’ve uploaded release config, deploy config and deploy logs from VSTS. Hopefully the answer is there

Hi Tarka, thanks for that.

I have noticed that in your Create Octopus Release task you have specified that the release should be deployed to environment Acceptans. This field maps to the deployTo parameter in octo.exe which will automatically deploy to the given environment. In other words, the release is already being deployed as part of your current Create Octopus Release task. I believe this is where the duplication may be coming from.

If this wasn’t intentional, it can easily be fixed by either removing the value for the Deployment -> To Envirionment field in your Create Octopus Release task or by removing your Deploy Octopus Release task.

Hopefully the above solves the problem for you :slight_smile:

Shaun Marx

Thank you for mentioning that! We removed that variable from Release step, but after the release we still get the deploy triggered (now it happens twice: we get the message about the deploy after the release step). It’s probably the octopus server, but I can’t find the related event.

I’ll add create release log from VSTS

Hi Tarka, no problem at all.

The only other thing I can think of that can possibly cause this would be automatic release creation and auto deploy. Do you perhaps have these configured by chance? Are there any other external things that could be deploying the release?

Another thing to check is your audit log screen in Octopus. It should give you at least some indication of the timing and or source of things.

Do you end up with duplicate deployments every time your build completes?

Shaun Marx

Hi Shaun,

thank you for replies!
The root of the issue was the settings in life-cycles. I actually wasn’t aware it was set up like that. Now the deploy is triggered in VSTS only. Everything was very obvious, but difficult to notice for a newbie. Thank you for your patience!

regards, Tarka

Hi Tarka, great to hear you managed to work it out.

Please let us know if there is anything else we can help with :slight_smile:

Shaun Marx

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.