gogs推送指定分支触发jenkins构建

配置推送到  Test_测试发布 分支时触发jenkins构建

#!/usr/bin/env bash
while read oldrev newrev refname
do
    branch=$(git rev-parse --symbolic --abbrev-ref $refname)         
    if [ "Test_测试发布" = "$branch" ]; then
    
        curl -I -X POST http://jenkins buildWithParameters接口?branch=$branch -u 用户名:密码
        
    fi
done

                
            
        
浙公网安备 33010602011771号