-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
Support OctoPack #472
Comments
Something like?: Task("Package")
.Description("Package the website for Octopus")
.Does(() =>
{
MSBuild("./Dashboard.sln", settings =>
settings
.SetConfiguration(configuration)
.WithTarget("Build")
.RunOctoPack()
.PublishPackageToHttp("http://my.server.com/api/v2")
.PublishApiKey("903840932840spsda-sdasdasdas"));
}); |
Sounds like a great addition to me 👍 |
@RichiCoder1, yeah, something like that, although there are several options and properties that can be set, so that might merit its own OctoPackSettings object and DSL builders. |
@jrnail23 @RichiCoder1 Sounds good to me. So something like this then? Task("Package")
.Description("Package the website for Octopus")
.Does(() =>
{
MSBuild("./Dashboard.sln", settings =>
settings
.SetConfiguration(configuration)
.WithTarget("Build")
.WithOctoPack(new OctoPackSettings()
.SomeOctoPackThing()
.SomeOtherOctoPackThing());
}); |
@patriksvensson, yeah, that's pretty much what I was thinking 😄 |
Is anyone working on this issue? If not I would like to help get it done |
@gep13 I think targeting an enhancement in either |
@arri-cc Would prefer if this was solved without involving MSBuild. Preferably this would be a wrapper around |
OctoPack is literally an msbuild intergration :). That being said, an Octo tool wrapper would be cool too. |
@RichiCoder1 Yes I know. Was more thinking about what I would prefer :) As long as stuff doesn't touch the MSBuild tools in any way and is done by extension methods I'm fine with that as well. |
For what is worth, my immediate thoughts were an addin around |
@gep13 An add-in |
@arri-cc perfect! Feel free to have a look at this: https://github.com/gep13/Cake.ReSharperReports as an example of how to create an addin. |
I've started to look into this. Here is my suggestion so far. octo pack takes the following arguments:
This can be quite nicely built in the same style as the existing OctoCreateRelease and OctoPush methods: Task("Package")
.Description("Packages the project")
.Does(() =>
{
OctoPack("MyPackage", new OctopusPackSettings
{
Format = OctopusPackFormat.NuPkg, // or OctopusPackFormat.Zip
Version = "1.2.3",
OutFolder = "./octopacked/",
BasePath = "./",
Author = "someone",
Description = "my sweet package",
ReleaseNotes = "good stuff was built",
ReleaseNotesFile = "releasenotes.md",
Include = new[]
{
"bin/*.dll",
"css/*",
"js/*"
},
Overwrite = true,
}); Thoughts? |
@cpx looks good to me. Which, if any of those properties are mandatory? All mandatory parameters should be into arguments to the alias, not contained within the Settings class. |
@gep13 Only the package ID is mandatory. Another aspect is that author, description and release notes are only valid if the format is NuPkg. Should the tool have any special handling if you provide any of them for Zip packages? Throw exception? Or just let octo handle it? I'm not sure what the convention is here. |
@cpx ok, good to know. With regard to the parameters, and when they used be used.... Does Octo handle the situation when parameters are passed in when they aren't required? If so, I think it would be safer just to let it handle the issues, rather than trying to replicate the issue in the addin. The thought process being that if octo, for some reason changes in a future release, we would need to update the logic as well, which feels wrong to me. |
@gep13 Just tried out a few combos and octo ignores the NuGet-specific parameters when creating a Zip-package. As you say, this behavior could change in the future, so adding parameter validation to Cake that octo doesn't currently care about also feels wrong to me. Should we then stick to only validating the package ID parameter? That one seems unlikely to become optional. |
Now we've got another Octopus tool with another set of parameter questions probably means we should revisit #1022 as well.. |
@agc93 Yeah I was thinking the same while I was implementing this. Pack is a bit special though, since it doesn't interact with the server it doesn't take apiKey or server parameters. |
Merged via #1218. |
Hi,
doesnt work for me -
If I use specific paths, instead of bin/* it does create the nupkg. |
@nimendra It would be better if you created a new issue or reached out in our Gitter channel than posting on a closed issue. Makes it impossible to track potential fixes over releases. Thanks! |
I'm thinking this would be done via extensions to the existing MSBuild settings & fluent interface DSL, as it just involves adding OctoPack-specific properties to your MSBuild command.
http://docs.octopusdeploy.com/display/OD/Using+OctoPack
The text was updated successfully, but these errors were encountered: