LoginSignup
0
0

More than 3 years have passed since last update.

Jenkins Job Build with Remote Execution

Last updated at Posted at 2019-11-14

Test Environment


  • Jenkins Version : v2.138.2
  • Job Name : HELLO
  • Token Name : outCall outcall.png

Jenkins Global Setting


  • Unchecked 'CSRF Protection'

    • Jenkins Management > Configure Global Security > CSRF Protection > Unchecked 'CSRF Protection' csrf.png
  • Create User API Token

    • Jenkins Management > Manage User > Select User(ex: 'admin') > Configure > API Token > Add new Token > Generate > Creation Token Value(ex: '1140d85eea07a2c01ce01bf9de450c04f6') api_token.png

Jenkins Job Setting


  • Create Job : 'HELLO'
  • Configure Job
    • 'HELLO' > Configure > Input 'outCall' keyword in 'Authenitication Token' configure.png

Testing


  • Call Jenkins Job(ex : 'HELLO') with curl command
# curl -X post http://<username>:<API_Token>@<JENKINS_URL>/jenkins/job/<JENKINS_JOB_NAME>/build?token=<TOKEN_Name>
$ curl -X post http://admin:1140d85eea07a2c01ce01bf9de450c04f6@123.123.123.123:8080/job/HELLO/build?token=outCall

Result


  • Call 3 times result.png
0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0