Jenkins Job Build with Remote Execution

2278 단어 Jenkins

Test Environment



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


  • Jenkins Global Setting




  • Unchecked 'CSRF Protection'
  • Jenkins Management > Configure Global Security > CSRF Protection > Unchecked 'CSRF Protection'



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



  • Jenkins Job Setting



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



  • 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:[email protected]:8080/job/HELLO/build?token=outCall
    

    Result



  • Call 3 times

  • 좋은 웹페이지 즐겨찾기