shell中调用jenkins API批量运行历史任务

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

posted @ 2017-06-01 14:50  丹江湖畔养蜂子赵大爹  阅读(1081)  评论(0编辑  收藏  举报