简体   繁体   English

Xcode构建自动化预定集成机器人设置

[英]Xcode build automation scheduled integration bot setting

I have checked bot schedule for manually,periodically and poll for new commit(it works in 5 min) all are three option working properly, but I am unable to understand fourth option "On commit using custom trigger script". 我已经手动检查了机器人时间表,并定期轮询新提交(它在5分钟内工作)所有三个选项都正常工作,但我无法理解第四个选项“使用自定义触发器脚本提交”。

Please any one can explain this how does this fourth option work? 请任何人解释一下这第四个选项是如何工作的? will it work for immediate integration on each commit. 它是否适用于每次提交的即时集成。

Please Check below link also: http://www.likelyanswer.com/30202671/How-Do-I-Create-A-Trigger-Script-For-Bot-On-Xcode-5-Ci%3F 请查看以下链接: http//www.likelyanswer.com/30202671/How-Do-I-Create-A-Trigger-Script-For-Bot-On-Xcode-5-Ci%3F 输入图像说明![在此处输入图像说明 ption here] 1 这里说明] 1

This is based on my own investigation and may be completely wrong in future releases. 这是基于我自己的调查,在未来的版本中可能完全错误。

The Xcode service exposes an HTTP endpoint to perform an immediate integration when the trigger script schedule option is selected: 当选择触发器脚本计划选项时,Xcode服务公开HTTP端点以执行立即集成:

POST /xcs/kick-commit-bots POST / xcs / kick-commit-bots

Parameters: 参数:

repository: URL to the repository as shown in the bot's settings. repository: bot的URL,如bot的设置中所示。

branch: (optional) Name of the branch to trigger integrations for. branch :(可选)触发集成的分支的名称。 If specified, only bots configured to build this branch will be integrated. 如果指定,则仅集成配置为构建此分支的机器人。 If unspecified, all bots for the specified repository will be integrated. 如果未指定,将集成指定存储库的所有机器人。

Example: 例:

curl http://server.local/xcs/kick-commit-bots \
 -d repository=ssh://server.local/git/example.git \
 -d branch=master

To make use of trigger script scheduling option you'll need to create a repository hook to trigger this endpoint on receipt of new commits. 要使用触发器脚本调度选项,您需要创建一个存储库挂钩,以在收到新提交时触发此端点。 OS X Server contains an example hook in /Applications/Server.app/Contents/ServerRoot/usr/share/collabd/server/ruby/kick_build_bot.rb . OS X Server在/Applications/Server.app/Contents/ServerRoot/usr/share/collabd/server/ruby/kick_build_bot.rb包含示例挂钩。 For hosted Git repositories created through the Xcode service a post-receive hook using this script is created for you automatically. 对于通过Xcode服务创建的托管Git存储库,将自动为您创建使用此脚本的post-receive挂钩。

Note that the repository URL sent to /xcs/kick-commit-bots must match the repository URL as shown in the bot's settings in the web interface. 请注意,发送到/xcs/kick-commit-bots的存储库URL必须与存储库URL匹配,如Web界面中bot的设置中所示。 It seems that for hosted repositories the URL can change - sometimes an ssh: URL is used and sometimes a file: URL is used. 似乎对于托管存储库,URL可以更改 - 有时使用ssh: URL,有时使用file: URL。

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

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