Jenkins and Octopus

Hi,
I am using Jenkins as build server and pushing artifact to Nexus and Octopus will download form it. How to sync the time between Jenkins and Octopus. Jenkins shows that build and deployment is completed. However, from Octopus dashboard still deployment is running. How to communicate back deployment status from Octopus to Jenkins. We are using Jenkins to communicate the whole CI/CD process. In other words, how Jenkins knows that the deployment at Octopus is completed (success/failure)?

Hi,

Welcome to the Octopus community!

Thanks for your question. You can get this information in a few ways.

If you are using the Jenkins plugin you can ticket the box Show deployment progress:

Another way is to use the API, this script gets the last successful release number for project and environment: https://github.com/OctopusDeploy/OctopusDeploy-Api/blob/master/REST/PowerShell/Releases/GetLastSuccessfulForProjectAndEnvironment.ps1.

The dashboard endpoint on the API may also be useful.

You could also use the Octopus CLI, the list-deployments command would be useful for this scenario.

Alternatively, you could leverage Octopus subscriptions, using this you could setup a subscription to send a payload to specific endpoint when a project deployment completes.

This image shows a subscription that, once a Payload URL is set, will send a JSON payload when a successful deployment to the Development environment occurs for the OctoPetShop project.

If you have any further questions please let me know!

Thanks,
Lianne