Built-in package repository triggers were formerly known as Automatic Release Creation
We have renamed the feature and refreshed the UI, but it still works the same way behind the scenes.
Getting started
If you use the built-in Octopus package repository, you can now select a package, that when uploaded will automatically create a release.
Built-in repository only
This trigger only supports the built-in package repository. There is some support for external feeds using the external feed triggers.
From the project’s trigger tab, click Add Trigger, and then select Built-in package repository.
As a project can contain multiple packages you need to select the package that will upload last in your build and push CI process. If you have multiple packages, make sure you select the package that is always uploaded last.
When a release is set to be created this way, the audit will tell you that is how the release was created.
If you combine uploading a package with the automatic deployment feature within lifecycle phases, you can push a package to the internal repository, create a release, and have it automatically deploy.
The release number that is created is guided by the Release Versioning setting under Settings.
Channels
You must select the channels that will be used for any automatically created releases. This means that only one channel for each project can have a built-in package repository trigger enabled at any one time. This can be painful, and here are some points you can consider:
- Use one of the build-server extensions, or the Octopus CLI to create releases instead of using triggers - this will automatically determine the best channel based on the release being created
- Choose the channel that will be used most commonly for automatically creating releases, and create releases manually for the other channels.
- Try creating some releases manually for the selected channel to make sure it works as expected.
Automatically creating pre-releases
When you push a package to your trigger step, Octopus will look for the latest available package for all other steps excluding pre-release packages by default - see this thread for background.
One way to work around this behavior is to create a channel with the appropriate version rules so that “latest available package” will be the pre-release packages you expected. The best way to test this is to practice creating releases manually for that channel - the “latest available package” will work the same way for manual and automatically created releases.
Troubleshooting
When you are using built-in package repository triggers there are many reasons why a release may not be created successfully. Take some time to consider the following troubleshooting steps:
-
Inspect the server logs for warnings in Configuration ➜ Diagnostics - Octopus will log the reason why the automatic release creation failed as errors or warnings.
-
Ensure you are pushing the package to the built-in package repository - use external feed triggers if you are pushing packages to other feeds.
-
Ensure you have configured the built-in package repository trigger for the project based on the correct package.
-
When using channels ensure you have configured the built-in package repository trigger for the desired channel.
-
Ensure you are pushing a new version of the package - Octopus will not create a release where the package has already been used for creating a release.
-
Ensure you are pushing a package that Octopus will consider as the latest available package - see the section above on automatically creating pre-releases.
-
Ensure the release creation package step does not use variables for the PackageId - Octopus will only create a release where the package is constant.
-
When a release has multiple packages, ensure you configure the built-in package repository trigger to use the last package that is pushed to the built-in repository - otherwise some of the packages required for the release will be missing.
-
When using channels the package must satisfy the version rules for the channel being used for the built-in package repository trigger - try creating some releases manually.
-
Are you pushing pre-release packages? See the section above on automatically creating pre-releases.
-
Ensure the account pushing the package has the required permissions for each of the projects and environments that will be involved in creating (and potentially deploying) the release. Consider which of the following permissions may be required depending on your circumstances:
BuiltInFeedPush
DeploymentCreate
EnvironmentView
FeedView
LibraryVariableSetView
LifecycleView
MachineView
ProcessView
ReleaseCreate
VariableView
Consider using a build server extension
We have extensions/plugins available for the most popular build servers. These extensions will help you create packages, push those packages to the built-in repository, create releases and deploy them to your environments:
Learn more
Take a look at the Octopus Guides which covers building and packaging your application, creating releases and deploying to your environments for your CI/CD pipeline.
Help us continuously improve
Please let us know if you have any feedback about this page.
Page updated on Wednesday, August 28, 2024