Jenkins integration with Octopus

HI
I have been trying to automate cicd with jenkins and when i was trying to push packages to Octopus im getting the following error

C:\Jenkins_Examroom\workspace\Examroom-octopus>exit 0
FATAL: Failed to push the packages: java.lang.NullPointerException
java.lang.NullPointerException
at hudson.plugins.octopusdeploy.AbstractOctopusDeployRecorderBuildStep.getOctopusToolPath(AbstractOctopusDeployRecorderBuildStep.java:225)
at hudson.plugins.octopusdeploy.AbstractOctopusDeployRecorderBuildStep.launchOcto(AbstractOctopusDeployRecorderBuildStep.java:283)
at hudson.plugins.octopusdeploy.OctopusDeployPushRecorder.perform(OctopusDeployPushRecorder.java:140)
at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
at hudson.model.Build$BuildExecution.build(Build.java:197)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513)
at hudson.model.Run.execute(Run.java:1906)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)

Build step ‘Octopus Deploy: Push packages’ changed build result to FAILURE
INFO: Not pushing build information due to job being in FAILED state.
INFO: Not creating a release due to job being in FAILED state.
INFO: Not deploying due to job being in FAILED state.
Finished: FAILURE

Hi @saikiranu,

Thanks for reaching out and sorry to see you’re running into an error.

The error looks like it is attempting to call the Octopus Deploy CLI tool. Could you double-check the path in your settings under Dashboard > Manage Jenkins > Global Tool Configuration:

I would also take a look under Dashboard > Manage Jenkins > Configuration and verify the Octopus Server is the expected URL and API key:

Please let me know if this helps.

Regards,
Garrett

Hi @garrett.dass ,
Thanks for your reply and apologies for the late reply.

I have configures both Global tool configuration and configuration in Jenkins-- manage Jenkins dashboard but i guess im missing something can u please help me in fixing the error and complete the automation so that i can implement the same for all the projects and upgrade to Pro version of octopus…

Hi @saikiranu,

Sorry to see you’re still running into issues.

If Jenkins cannot see the CLI tool it might be that your service user does not have permission to access the C:\OctopusTools path. You can take a look at the user associated with the Jenkins service here:

You may have seen it already but, it might be helpful to walk through this Guide as I don’t want to miss any steps that you might need.

Please let me know if that helps you get unstuck!

Regards,
Garrett

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.