Pushing Team City artifacts to Octopus Deploy

I am having trouble pushing a .zip artifact from Team City to Octopus Deploy and would like to requisition some help with this.

Using the “OctopusDeploy: Push packages” runner on Team City, I am trying to push the artifact “Release.%MajorVersion%.%MinorVersion%.%build.number%.zip” to our Octopus Server.

This, however, fails with the following error message:

[04:58:19][Octopus Deploy] Please specify a package to push
[04:58:19][Octopus Deploy] Exit code: -1
[04:58:19][Octopus Deploy] Octo.exe exit code: -1
[04:58:19][Step 3/3] Unable to create or deploy release. Please check the build log for details on the error.

In the “Artifacts path” field of the “General Settings” section of the Build Configuration in Team City, I have defined the following artifact to be created:
+:Release => Release.%MajorVersion%.%MinorVersion%.%build.number%.zip
-:Release/**/*.xml => Release.%MajorVersion%.%MinorVersion%.%build.number%.zip

This creates the file “Release.%MajorVersion%.%MinorVersion%.%build.number%.zip” in the path [Team City Data Directory]\system\artifacts[Project Name][Configuration Name][Unique Build Number].

Next, I try to push this package to our Octopus Server by using the “OctopusDeploy: Push packages” runner with the “Package paths” parameter set to “Release.%MajorVersion%.%MinorVersion%.%build.number%.zip”, since the descriptive text says “These follow the same rules as TeamCity artifact paths.”

However, this does not appear to work.

I would like to know why, and how I could get it to work.

My main problem at this point is that I don’t know how I can address the “Release.%MajorVersion%.%MinorVersion%.%build.number%.zip” file in the mutable artifacts directory.

Hi Kira, thanks for reaching out.

I believe this may be a path issue since your current working directory in the context of your Push Packages task will be the root directory for the build agent. This means that you would have to use the full path to the zip file for example:

[Team City Data Directory]\system\artifacts[Project Name][Configuration Name][Unique Build Number]\Release.%MajorVersion%.%MinorVersion%.%build.number%.zip

In regards to the description about supporting the same rules as TeamCity artifact paths. This is basically alluding to the fact that it can be used instead of it. It doesn’t mean that it will execute as the artifacts folder being the current working directory.

The OctopusDeploy: Push packages task packages and pushes the content based on the expressions that you provide. If you use the original expressions that you specified for “Artifacts Path” here instead, you should get the outcome you are looking for. The expressions I am referring to are these:

+:Release => Release.%MajorVersion%.%MinorVersion%.%build.number%.zip
-:Release/**/*.xml => Release.%MajorVersion%.%MinorVersion%.%build.number%.zip

You can also make the output available as before by selecting the publish packages as build artifacts checkbox.

Please let me know if that helps.

Shaun Marx

Hi Shaun,

thanks for your reply. By now, I have developed a different way of achieving my results, but thanks to your description I now understand the nature of my initial problem, and what I have to do if I run into a similar issue again.

So thank you very much

Hi Kira, no problem at all.

Glad you managed to solve your problem! Please let us know if there is anything else we can help with.

Shaun Marx

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.