shell中调用jenkins API批量运行jenkins带参数的任务:
#!/bin/sh
#startdate=20150127
startdate=20150201
while [ "$startdate" -ge "20131011" ];
do
url="http://192.168.53.100:8099/jenkins/job/temp_pv_is_pay_film_vipuv_unvipuv_day/buildWithParameters?CURRENT_DATE=${startdate}"
curl -X POST ${url} --user jenkins用户名:jenkins密码 startdate=`date -d "${startdate} 1 day ago" +%Y%m%d`
done