简体   繁体   English

Jenkins参数化构建

[英]Jenkins with parameterized build

I am configuring a post commit hook and would like to be able to trigger a build on the branch that has been committed. 我正在配置一个post commit钩子,并希望能够在已提交的分支上触发构建。

So far i have set up the post-commit hook file 到目前为止,我已经设置了post-commit钩子文件

curl http://jenkins.local:8080/git/notifyCommit?url=GITHUB_URL/REPO_NAME.git

Within Jenkins i have set 在詹金斯内,我已经确定了

This build is parameterized

**String Paramenter**
Name: branch

Branches to build: $branch

How can i get jenkins to build the branch that has just been committed? 我怎样才能让jenkins建立刚刚提交的分支?

See http://<Your Jenkins>/job/<Your job's name>/api/ : 请参阅http://<Your Jenkins>/job/<Your job's name>/api/

Perform a build 执行构建

If the build has parameters, post to this URL [ http://<Your Jenkins>/job/<Your job's name>/buildWithParameters ] and provide the parameters as form data. 如果构建具有参数,请发布到此URL [ http://<Your Jenkins>/job/<Your job's name>/buildWithParameters ]并将参数作为表单数据提供。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM