0
我正在使用Buildbot V.0.9.0rc3如何將變量傳遞給Buildbot?
當我通過命令行發送更改時,或者如果我接受了一個http Post請求到正確的地址,我的Buildbot會觸發。
目前我發送變化以兩種不同的方式Buildbot:
$ buildbot sendchange -m localhost:9999 -a example-user:pass -W me -C default
或
curl -X POST -d author=aalvz -d comments=mycomment -d project=my_project -d category=default -d repository=some http://192.168.33.20:8020/change_hook/base
我調度的定義是這樣的:
c['schedulers'].append(schedulers.SingleBranchScheduler(
name="waiter",
builderNames=["runtests"],
change_filter=util.ChangeFilter(category='default')))
c['www'] = dict(port=8020,
plugins=dict(waterfall_view={}, console_view={}),
change_hook_dialects={
'base': True,
'somehook': {'option1':True,
'option2':False}})
而我的步驟工廠克隆回購看起來是這樣的:
factory.addStep(steps.Git(repourl='[email protected]:AAlvz/my_repo.git', mode='full', workdir='newFolder', branch='my_branch', submodules=True, clobberOnFailure=True))
我想收到一些數據的POST,並使用這些數據來觸發不同的命令。喜歡的東西:(使用$
使變量明顯)
factory.addStep(steps.Git(repourl=$myjson.name, mode='full', workdir=$myjson.path, branch=$myjson.branch, submodules=True, clobberOnFailure=True))
這樣,我可以把一個JSON,如:
{myjson: {name: github/myrepo.git, path: /tmp/my/path, branch: my_branch}}
,並能夠克隆由JSON提供的存儲庫。
在此先感謝!我希望這個問題很清楚。我可以提供日誌或任何所需的配置。謝謝!