Hi. I’ve downloaded Octopus Deploy 3.3 beta for .NET Core 1.0 support. I am trying to upload a .zip file, and I am unable to get past 400 Bad Request. There are 0 packages uploaded to this server.
System.Net.WebException: The remote server returned an error: (400) Bad Request.
at System.Net.WebClient.UploadFile(Uri address, String method, String fileName)
at UploadFile(Object , Object[] )
at System.Management.Automation.DotNetAdapter.AuxiliaryMethodInvoke(Object target, Object[] arguments, MethodInformat
ion methodInformation, Object[] originalArguments)
Hi,
Its great to hear you have already downloaded the 3.3 beta and have begun to put it through its paces. We have indeed just added support for pushing zip packages however it looks as though there a few things that you will need to change to get this script working.
First, I notice that the package you are pushing is called Core.zip. As outlined the documentation on supported packages, non-NuGet packages require a specific naming format so that we can extract both the package name and version. For example, the package should be named something like MyPackage.1.2.0.zip.
Secondly since this upload endpoint is an extension of the endpoint that supports the NuGet push api, it needs to be formatted with the content type multipart/form-data, along with the file-name in the content body.
Check out LINQPad script for an example on how this might work in a C# script.
A naive PowerShell converted version of this script might look something like
We have flagged this area as something that requires a little more documentation which we will add to in the future by providing a few more language examples. On a side-note we do also have plans to extend octo.exe to support push commands so keep an eye out for that too!
I hope this response helps you to solve your problem. Please let me know if you run into any further problems pushing this package.
Cheers,
Robert