Teamcity Octopus deployment with .Net Core not creating .zip

Follow the steps below:

  • dotnet recovery
  • dotnet publish
  • octopusDeploy: Push Packages

The second step creates the published-application folder, and the third step is for creating and creating a .zip file and sending it to the Octopus server.

The third step is connecting to the Octopus server, but the error message is:

Running the command: octo.exe push --server http://server.com/ --apikey SECRET

Pushing Packets to Octopus Server

Please specify a package to click

I am following this https://stackoverflow.com/a/3776402/2 , so my third step is:

%teamcity.build.workingDir%/published-app/**/* => App.zip 

Any ideas why the zip file is not being created?

+6
source share
1 answer

Not sure if you have ever made money for yourself, but just in case, it helps someone who has recently had the same problem, deploying the AspNetCore 2.0 web application running on net471, which is created by TeamCity 2017.1.4 (build 47070 )

After some intervention, I noticed that the build step of OctopusDeploy: Create and Push Packages was done in our git checkout root directory, so I had to use the following values ​​for the package path templates

% ProjectDirectory% / published-app / ** / * =>% ProjectName%.% GitVersion.NuGetVersion% .zip

NB: %ProjectDirectory% , %ProjectName% and %GitVersion.NuGetVersion% are the build parameters that we manually defined elsewhere in the build process that could replace TeamCity. %ProjectDirectory% is simply the application source directory relative to the root of git checkout ie WebApplication1 , so the full path will be <full checkout path>/WebApplication1

Another problem we experienced was that at the time of writing the combination of TeamCity and octo.exe (from Octopus.TeamCity v4.15.10) did not like creating nupkg files, so make sure you are trying to create ". Zip". In error instances, we would get the following error:

Error in Octo.exe: it is not possible to start the program "C: \ BuildAgent \ temp \ buildTmp \ octo-temp \ 3.0 \ octo.exe" (in the directory "C: \ BuildAgent \ work \ 4e62985fa616fa1f"): CreateProcess error = 206, Name file or extension is too long

0
source

Source: https://habr.com/ru/post/1012043/


All Articles