Home / Companies / Octopus Deploy / Blog / Post Details
Content Deep Dive

Learn how to call the Jenkins REST API from PowerShell

Blog post from Octopus Deploy

Post Details
Company
Date Published
Author
Matthew Casperson
Word Count
716
Company Posts That Month
6
Language
English
Hacker News Points
-
Post removed?
No
Summary

In a blog post by Matthew Casperson, the process of triggering Jenkins builds using Octopus is explored, highlighting a method to initiate Jenkins deployments via its REST API and PowerShell. Jenkins employs a Cross Site Request Forgery (CSRF) protection mechanism, necessitating the inclusion of a "crumb" in each API request header. Casperson provides a PowerShell script to generate this crumb by making a request to the Jenkins crumb issuer endpoint. With the crumb in hand, users can programmatically trigger Jenkins builds by sending a POST request to a specific URL associated with the Jenkins job, which is demonstrated in the provided PowerShell script. The successful execution of the script is confirmed by an HTTP 201 status code, indicating that the job was created on the Jenkins server.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.