Packaging Applications

Last updated

Deploying software with Octopus often involves deploying packages. This section explains how to package your applications for deployment with Octopus.

Before you can deploy a package you need to:

  1. Give your package a package ID.
  2. Choose and apply a versioning scheme.
  3. Create the package in a supported format.
  4. Host the package in a package repository, such as the Octopus built-in repository.

Example Package

This is a simple example of a package that can be deployed by Octopus:

In this example, hello-world is the package ID, 1.0.0 is the version number, and zip is the format and file extension. Together, they uniquely identify the package.


Package ID

Package IDs must conform to the following specifications:

  • Package IDs must be unique within your Octopus Deploy instance.
  • Package IDs consist of one or more segments separated by one of the following separator characters: - . _.
  • Segments contain only alphanumeric characters.

For instance. The package ID in our sample package is hello-world.

Avoid using numbers in your package ID as it could result in your version number being incorrectly parsed.

Version Numbers

Octopus supports Semantic Versioning, unless you are deploying artifacts to a Maven repository, in which case you will need to use Maven Versions.

The version number needs to be applied to your package after the package ID and before the format. For instance. The version number in our sample package is 1.0.0.

Learn more about versioning schemes.

Supported Formats

It is important that your packages have the correct file extension because Octopus uses the file extension to determine the correct extraction algorithm to use with your packages.

Package Type File Extensions Notes
NuGet .nupkg Compatible with any NuGet repository (including the Built-In repository). Currently only NuGet packages will have extra metadata like release notes and description extracted from the package metadata.
Zip .zip Standard zip file as created through most common zip programs. Compatible with the built-In repository only.
JAR WAR EAR RAR .jar, .war, .ear, .rar Compatible with the built-In repository and Maven Feeds from Octopus 4.1.
Tar .tar Compatible with the Built-In repository only.
Tar + Gzip .tgz, .tar.gz, .tar.Z Compatible with the built-In repository only.
Tar + Bzip2, .tar.bz2, .tbz* Compatible with the built-In repository only.
Docker Image Docker Registries. Learn about Docker and Octopus Deploy.

Creating Packages

We've created the following tools to help package your applications for deployment with Octopus:

  • Octo.exe to create Zip Archives and NuGet packages for .NET Core apps and full .NET framework applications.
  • Octopack to create NuGet packages for ASP.NET apps (.NET Framework) and Windows Services (.NET Framework).
  • A TeamCity plugin.
  • An Azure DevOps plugin.

In addition to these tools, you can use other tools to create your packages, for instance, you might use the following:

There are many more tools you might choose to use, but as long as you can create one of our supported packages you can deploy your applications with Octopus Deploy.

Build Server Integration

Your continuous integration/build server will package your applications and make them available to Octopus for deployment from a package repository. The following tools are available to integrate your continuous integration/build server with Octopus Deploy: