jenkins api调用

  在使用jenkins的时候,有时候需要其他外部调用,下面是调用方法,不定期更新

  job调用

  使用user和password: curl -X POST "jobPath/buildWithParameters?xxx=aa&ccc=bb..." --user username:userpassword

  使用token:curl -X POST "jobPath/buildWithParameters?xxx=aa&ccc=bb..." --data token=96959e84bbdfebfba2d4122160e32a3b

    jobPath:job的jenkins地址

  buildWithParameters:表示触发并带参数

  xxx=...:参数列表

  token:用户token,在jenkins中查询

原文地址:https://www.cnblogs.com/ChinaHook/p/5508847.html