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, for instance, 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 of the package, and zip is the format and file extension. Together, they uniquely identify the package.


Package ID

Package IDs must conform to 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.

See also, choosing a versioning scheme.

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 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.
Tar .tar Built-In repository only
Tar + Gzip *.tgz, .tar.gz, .tar.Z Built-In repository only
Tar + Bzip2, .tar.bz2, .tbz Built-In repository only
Zip .zip Built-In repository only. Standard zip file as created through most common zip programs.
Docker Image Docker Registries. Learn about Docker and Octopus Deploy.
JAR WAR EAR RAR .jar, .war, .ear, .rar Built-In repository (and Maven Feeds from 4.1). Learn about Maven Feeds.

Pre-Release packages and Multipart file extensions

If you're planning to use a multi-part file extension (e.g. .tar.gz) with a pre-release naming convention (MyApp.1.0.0-beta.tar.gz) and use the Run on Server step option, this will result in an error message of Unsupported file extension .gz. This is because the .tar forms part of pre-release tag and not part of the file extension.

The error only occurs on Run on Server steps and deployments execute as expected on Tentacles.