Our customer is using TeamCity for CI and Octopus Deploy for deployment. Also we have Selenium based tests (in .Net platform) available which are configured to run from Jenkins build.
The requirement is to trigger or start Jenkins build after Octopus Deploy is completed with it’s deployment. The trigger should be automatic and happen once the deployment is completed.
After the testing in respective test environment, Jenkins build should pass the result to Octopus Deploy to mark whether the deployment is successful.
Can you please help to find out if there is a way to achieve the above integration?
Hi @Venkata_Praveen, thanks for reaching out.
The easiest way to trigger a job in Jenkins is to use the Jenkins CLI, which is documented at https://jenkins.io/doc/book/managing/cli. By using the CLI from Octopus to trigger a build in Jenkins, you can trigger a build once an Octopus deployment has finished, and then Octopus can wait for the result.
You will most likely want to run the
build command, waiting for the build to finish. https://support.cloudbees.com/hc/en-us/articles/228392127-How-to-wait-for-build-to-finish-when-triggering-from-CLI- has some documentation on how to trigger and wait for a build in Jenkins.
So the high level process would be:
- Octopus completes a deployment
- Octopus calls the Jenkins CLI to run a build
- Octopus waits for the build to finish, checks the return code for the status of the job
- If the Jenkins job was successful, Octopus completes successfully. If the Jenkins job failed, the Octopus deployment will also fail.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.