跳到主文
部落格全站分類:數位生活
Use cURL to trigger Jenkins job.
1. Enable “Trigger builds remotely”, and enter the “Authentication Token”.
2. cURL trigger command.
cURL command format:
curl -X POST "https://<JENKINS_URL>/buildByToken/buildWithParameters?" \ --data "token=<AUTHENTICATION_TOKEN>" \ --data "job=<JOB_NAME>" \ --data "param_name1=param_value1" --data "param_name2=param_value2"
cURL command example:
curl -X POST "https://my-jenkins-url/buildByToken/buildWithParameters?" \ --data "token=dGVzdAo=" \ --data "job=TEST_JOB" \ --data "ENV=dev"
dreamtails 發表在 痞客邦 留言(0) 人氣()
Resolved by Jenkins-plugin "Maven Integration plugin"