Integration with Bamboo

Hello,

I am integrating bamboo with Octopus Deploy, In Bamboo, I had create a plan for building a sample android application ‘HelloWorld’ using Visual Studio Configuration that is:
1). Executable - Visual Studio 2015
2). Solution - HelloWorld.sln
3). Options - msbuild /t:SignAndroidPackage /p:Configuration=Release /p:OctoPackPackageVersion=1.0.${bamboo.buildNumber} /p:OctoPackPublishPackageToHttp=http://localhost:8080/app#/library/packages /p:OctoPackPublishApiKey=${bamboo.OctopusApiKey_Password}
4). Platform - x86
5). Environment variables - Empty
6). Working sub directory - Empty

I am also attaching the snap of the screen.

I have created a android project in Visual Studio using xamarin extension and add octopus NuGet package to my project and successfully able to create NuGet package and build my project in visual studio than I have pushed my code to git repository and create a build plan by integrating my git repository and create a build plan to build my android project and the parameter which I passed to the bamboo MSBuild runner is : MSBuild /t:SignAndroidPackage /p:Configuration=Release /p:OctoPackPackageVersion=1.0.${bamboo.buildNumber} /p:OctoPackPublishPackageToHttp=http://localhost:8080/app#/library/packages /p:OctoPackPublishApiKey=${bamboo.OctopusApiKey_Password}
And also my build plan successfully run’s but there are no NuGet packages is pushed to my octopus server under Library -> Packages.

Thanks,
Rahul

Hi Rahul,

Thanks for reaching out! The URL to which you are pushing the package in the MSBuild param (/p:OctoPackPublishPackageToHttp=http://localhost:8080/app#/library/packages) doesn’t match the one Octopus provides you in the Library -> Packages page.

Check the value Octopus provides for the URL in the -Source parameter of the first example in 2017-03-08_(1).png.

Hope that helps!
Dalmiro

Hi Dalmiro,

Thanks for your help, I have tried by changing the URL to push my package in the MSBuild param
(/p:OctoPackPublishPackageToHttp=http://localhost:8080/nuget/packages) by the value Octopus provides for the URL in the -source parameter but still not able to push the packages.

I am giving you the url of the video of what I am doing : https://www.screencast.com/t/7gwHdtw04xdv

It would be appreciated, if you have any idea of what I am doing wrong.

Thanks,
Rahul

Hi Rahul,

Thanks for the great repro steps! What I’m gonna need is a build log showing the exact error you got during the bamboo build.

Could you also try to push a package manually using Nuget.exe instead of doing it through Bamboo? Just as a way to isolate the issue with the minimum amount of tools in the middle. If possible also set the verbosity of the command to “Detailed”: https://docs.microsoft.com/en-us/nuget/tools/nuget-exe-cli-reference#push

Thanks,
Dalmiro

Hi Dalmiro,

Thanks for the help, I have tried to push a package manually using NuGet.exe here is the command which I am using: “Nuget push D:\TestNuGet.1.0.0.0.nupkg -ApiKey 71KC9T7MCGKYPZQYI9NHIZD97VM -Source http://localhost:8080/nuget/packages -ConfigFile C:\Users\rahul\AppData\Roaming\NuGet\NuGet.config -verbosity detailed” and not able to do that.

Please have a look on the video: https://www.screencast.com/t/aOFPFbsY

Thanks,
Rahul

Hi Rahul,

Could you try running this from a regular command prompt and without passing the -configfile parameter?

Thanks,
Dalmiro

Hi Dalmiro,

I have tried pushing packages using regular command prompt without passing the -configfile parameter but it’s again and again prompting for username and password.

Please refer to the video: https://www.screencast.com/t/R2PxfIehHPx0

Thanks,
Rahul

Hi Rahul,

I wonder if there’s some kind of setting in your nuget.config file that’s enforcing this behavior. Is there any chance you can send me the contents of that file? By default it is under C:\Users[user]\AppData\Roaming\NuGet\nuget.config.

And just for the sake of testing, could you try pushing your package using Octo.exe push? This method doesn’t use Nuget.exe (unlike Octopack) so my hunch is that it will succeed.

Command guideline: https://octopus.com/docs/api-and-integration/octo.exe-command-line/pushing-packages

Download link: https://download.octopusdeploy.com/octopus-tools/4.13.4/OctopusTools.4.13.4.zip

Thanks,
Dalmiro