Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to deploy an existing release in OctopusDeploy #1228

Closed
trailmax opened this issue Sep 14, 2016 · 8 comments
Closed

Option to deploy an existing release in OctopusDeploy #1228

trailmax opened this issue Sep 14, 2016 · 8 comments
Milestone

Comments

@trailmax
Copy link
Contributor

Once you crated a release in Octopus Deploy through Cake, there is no option to deploy that release. I've got a draft code that can do that, but I see there are a few issues around OctopusDeploy: #1022, pending PR #1218.

I'm not sure what is the conclusion of discussion about duplicating parameters for server and apikey in alias calls and settings object. So here is my proposal:

    [CakeMethodAlias]
    public static void OctoDeployRelease(this ICakeContext context, string server, string apiKey, string projectName, string deployTo, string releaseNumber, DeployReleaseSettings settings)
    {
        // do deploy
    }

    [CakeMethodAlias]
    public static void OctoDeployRelease(this ICakeContext context, string server, string apiKey, string projectName, string deployTo,  DeployReleaseSettings settings)
    {
        OctoDeployRelease(context, server, apiKey, projectName, deployTo, "Latest", settings);
    }

My only concern is #1022 - Should I base the settings object on common OctopusDeploySettings while it still has Server and ApiKey parameters?

@patriksvensson
Copy link
Member

patriksvensson commented Sep 14, 2016

@trailmax Looks like release number isn't mandatory, so it should be on the settings class. DeployReleaseSettings is also too generic, so would be better if you called that OctoDeployReleaseSettings to keep consistency with other tools.

[CakeMethodAlias]
public static void OctoDeployRelease(this ICakeContext context, string server, string apiKey, string projectName, string deployTo,  DeployReleaseSettings settings)
{
  // Implementation   
}

@patriksvensson
Copy link
Member

@trailmax projectName and deployTo is required by the underlying tool as well to function?

@trailmax
Copy link
Contributor Author

Yes, it would not now what to do without these parameters - see http://docs.octopusdeploy.com/display/OD/Deploying+releases

@trailmax
Copy link
Contributor Author

@patriksvensson ReleaseNumber is not optional - it can be "Latest" or a version, but it must be there. One of the ways to do it - have default settings object set up with "Latest", but then option to override it. I almost like it, but then what version are you deploying is quite important and I can see that every call to deploy will end up with settings object specifying the exact release. So I'm in favour of having it as a mandatory param outside of the settings object.

@patriksvensson
Copy link
Member

@trailmax Ok, but then I think it should be up to the user to pass latest and only have one alias since this convention potentially could be changed, and we would keep as close to the underlying tool as possible.

@trailmax
Copy link
Contributor Author

@patriksvensson Sounds good. I won't do the override then.

@patriksvensson
Copy link
Member

@trailmax Perfect! 👍

@devlead
Copy link
Member

devlead commented Oct 20, 2016

Fixed by #1229

@devlead devlead closed this as completed Oct 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants