<div dir="ltr"><div><div><div>Hi Pierre,<br></div><br></div>I found the documentation, thanks for your help.<br><br><br></div>Best Regards<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="font-size:12.8000001907349px">Song Tang</span></div></div></div></div></div></div>
<br><div class="gmail_quote">On 11 April 2017 at 13:57, Song Tang <span dir="ltr"><<a href="mailto:song.tang@yobibyte.com.au" target="_blank">song.tang@yobibyte.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Pierre,<br></div>Thanks for pointing me to the right direction.<br>Can you give me an example regarding how to assign a git step to a codebase?<br></div><div>I didn't see anything in "setps.Git".<br><br></div><div>I can see git is trying to pull from the correct branch now, but I am getting the error: <br></div><pre class="m_5810556598626227008gmail-select-content m_5810556598626227008gmail-log" style="margin-left:40px"><span class="m_5810556598626227008gmail-no-wrap m_5810556598626227008gmail-log_o"><span class="m_5810556598626227008gmail-">No sourcestamp found in build for codebase ''<br></span></span></pre><pre class="m_5810556598626227008gmail-select-content m_5810556598626227008gmail-log">My configuration is like this now:<br>####### CHANGESOURCES<br><br>all_repositories = {<br> r'git@git.example.net:repo1':'<wbr>repo1',<br> r'git@git.example.net:repo2':'<wbr>repo2',<br> r'git@git.example.net:repo3':'<wbr>repo3',<br> r'git@git.example.net:repo4':'<wbr>repo4'<br>}<br><br>def codebaseGenerator(chdict):<br> return all_repositories[chdict['<wbr>repository']]<br><br>c['codebaseGenerator'] = codebaseGenerator<br><br>c['change_source'] = []<br>c['change_source'].append(<wbr>changes.GitPoller(<br> 'git@git.example.net:repo1',<br> branch='dev', pollinterval=20,project='<wbr>repo1',workdir='repo1'))<br>c['change_source'].append(<wbr>changes.GitPoller(<br> 'git@git.example.net:repo2',<br> branch='dev', pollinterval=20,project='<wbr>repo2',workdir='repo2'))<br>c['change_source'].append(<wbr>changes.GitPoller(<br> 'git@git.example.net:repo3',<br> branch='dev', pollinterval=20,project='<wbr>repo3',workdir='repo3'))<br>c['change_source'].append(<wbr>changes.GitPoller(<br> 'git@git.example.net:repo4',<br> branch='master', pollinterval=20,project='<wbr>repo4',workdir='repo4'))<br><br>####### SCHEDULERS<br>repo1_codebases = {<br> 'repo1': {<br> 'repository': 'git@git.example.net:repo1',<br> 'branch': 'dev',<br> 'revision': None<br> } <br>}<br> <br>repo2_codebases = {<br> 'repo2': {<br> 'repository': 'git@git.example.net:repo2',<br> 'branch': 'dev',<br> 'revision': None<br> }<br>}<br> <br>repo3_codebases = {<br> 'repo3': {<br> 'repository': 'git@git.example.net:repo3',<br> 'branch': 'dev',<br> 'revision': None<br> }<br>}<br> <br>repo4_codebases = {<br> 'repo4': { <br> 'repository': 'git@git.example.net:repo4',<br> 'branch': 'master',<br> 'revision': None<br> }<br>}<br>test_codebases = repo1_codebases.copy()<br>test_codebases.update(repo2_<wbr>codebases)<br>test_codebases.update(repo3_<wbr>codebases)<br>test_codebases.update(repo4_<wbr>codebases)<br><br>test_filter = util.ChangeFilter(project=['<wbr>repo1','repo2','repo3','repo4'<wbr>])<br>c['schedulers'] = []<br>c['schedulers'].append(<wbr>schedulers.<wbr>SingleBranchScheduler(<br> name="all",<br> change_filter=test_filter,<br> treeStableTimer=30,<br> builderNames=["saltharness"],<br> codebases=test_codebases))<br>c['schedulers'].append(<wbr>schedulers.ForceScheduler(<br> name="force",<br> builderNames=["saltharness"]))<br><br>####### BUILDERS<span class=""><br>factory = util.BuildFactory()<br>factory.workdir = "O:\\Prj\\repo4"<br># check out the source<br></span>factory.addStep(steps.Git(<wbr>repourl='git@git.example.net:r<wbr>epo4', mode='full', branch='master'))<span class="HOEnZb"><font color="#888888"><br><br></font></span></pre><span class="HOEnZb"><font color="#888888"><pre class="m_5810556598626227008gmail-select-content m_5810556598626227008gmail-log"><span class="m_5810556598626227008gmail-no-wrap m_5810556598626227008gmail-log_o"><span class="m_5810556598626227008gmail-"></span></span></pre></font></span></div><div class="gmail_extra"><span class="HOEnZb"><font color="#888888"><br clear="all"><div><div class="m_5810556598626227008gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="font-size:12.8000001907349px">Song Tang</span></div></div></div></div></div></div></font></span><div><div class="h5">
<br><div class="gmail_quote">On 10 April 2017 at 18:07, Pierre Tardy <span dir="ltr"><<a href="mailto:tardyp@gmail.com" target="_blank">tardyp@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Song,<div><br></div><div>What you need to setup is multiple codebase.</div><div>Each of your git step can then be assigned to one codebase so that it only pull the changes belonging to its codebase.</div><div><br></div><div>Regards</div></div><br><div class="gmail_quote"><div><div class="m_5810556598626227008h5"><div dir="ltr">On Mon, Apr 10, 2017 at 7:41 AM Song Tang <<a href="mailto:song.tang@yobibyte.com.au" target="_blank">song.tang@yobibyte.com.au</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_5810556598626227008h5"><div dir="ltr" class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg">Hi,<br class="m_5810556598626227008m_7270657520954574455gmail_msg"></div>I am trying to setup a build with multiple repositories:<br class="m_5810556598626227008m_7270657520954574455gmail_msg"></div><div style="margin-left:40px" class="m_5810556598626227008m_7270657520954574455gmail_msg">1. There are three change sources, let's say repo1, repo2 and repo3, I want buildbot to monitor dev branch on these sources<br class="m_5810556598626227008m_7270657520954574455gmail_msg">2. When any of these repositories changes, I wan to buildbot to start build in a forth repository(repo4) on master branch<br class="m_5810556598626227008m_7270657520954574455gmail_msg"><br class="m_5810556598626227008m_7270657520954574455gmail_msg"></div></div>I can set up buildbot to start the build, but it always pulls from dev branch on repo4, and because there is no dev branch in repo4, the build fails.<br class="m_5810556598626227008m_7270657520954574455gmail_msg"></div><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><br class="m_5810556598626227008m_7270657520954574455gmail_msg"></div>My change_source settings are like this:<br class="m_5810556598626227008m_7270657520954574455gmail_msg"><br class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><div style="margin-left:40px" class="m_5810556598626227008m_7270657520954574455gmail_msg">c['change_source'] = []<br class="m_5810556598626227008m_7270657520954574455gmail_msg"><br class="m_5810556598626227008m_7270657520954574455gmail_msg">repo1 = changes.GitPoller(<br class="m_5810556598626227008m_7270657520954574455gmail_msg"> 'git@git.example.net:repo1',<br class="m_5810556598626227008m_7270657520954574455gmail_msg"> workdir='eisalt', branch='dev',<br class="m_5810556598626227008m_7270657520954574455gmail_msg"> pollinterval=60, pollAtLaunch=True, project='builtbot_example')<br class="m_5810556598626227008m_7270657520954574455gmail_msg"><br class="m_5810556598626227008m_7270657520954574455gmail_msg">c['change_source'].append(repo<wbr>1)<br class="m_5810556598626227008m_7270657520954574455gmail_msg"><br class="m_5810556598626227008m_7270657520954574455gmail_msg">repo2 = changes.GitPoller(<br class="m_5810556598626227008m_7270657520954574455gmail_msg"> 'git@git.example.net:repo2',<br class="m_5810556598626227008m_7270657520954574455gmail_msg"> workdir='eisalt', branch='dev',<br class="m_5810556598626227008m_7270657520954574455gmail_msg"> pollinterval=60, pollAtLaunch=True, project='builtbot_example')<br class="m_5810556598626227008m_7270657520954574455gmail_msg"><br class="m_5810556598626227008m_7270657520954574455gmail_msg">c['change_source'].append(repo<wbr>2)<br class="m_5810556598626227008m_7270657520954574455gmail_msg"><br class="m_5810556598626227008m_7270657520954574455gmail_msg">repo3 = changes.GitPoller(<br class="m_5810556598626227008m_7270657520954574455gmail_msg"> 'git@git.example.net:repo3',<br class="m_5810556598626227008m_7270657520954574455gmail_msg"> workdir='eisalt', branch='dev',<br class="m_5810556598626227008m_7270657520954574455gmail_msg"> pollinterval=60, pollAtLaunch=True, project='builtbot_example')<br class="m_5810556598626227008m_7270657520954574455gmail_msg"><br class="m_5810556598626227008m_7270657520954574455gmail_msg">c['change_source'].append(repo<wbr>3)<br class="m_5810556598626227008m_7270657520954574455gmail_msg"></div><br class="m_5810556598626227008m_7270657520954574455gmail_msg"></div><div class="m_5810556598626227008m_7270657520954574455gmail_msg">My Schedulers settings:<br class="m_5810556598626227008m_7270657520954574455gmail_msg"><br class="m_5810556598626227008m_7270657520954574455gmail_msg"><div style="margin-left:40px" class="m_5810556598626227008m_7270657520954574455gmail_msg">test_filter = util.ChangeFilter(project='bui<wbr>ltbot_example')<br class="m_5810556598626227008m_7270657520954574455gmail_msg">c['schedulers'] = []<br class="m_5810556598626227008m_7270657520954574455gmail_msg">c['schedulers'].append(schedul<wbr>ers.AnyBranchScheduler(<br class="m_5810556598626227008m_7270657520954574455gmail_msg"> name="all",<br class="m_5810556598626227008m_7270657520954574455gmail_msg"> change_filter=test_filter,<br class="m_5810556598626227008m_7270657520954574455gmail_msg"> treeStableTimer=60,<br class="m_5810556598626227008m_7270657520954574455gmail_msg"> builderNames=["test_worker"]))<br class="m_5810556598626227008m_7270657520954574455gmail_msg"></div><br class="m_5810556598626227008m_7270657520954574455gmail_msg">My BUILDERS settings:<br class="m_5810556598626227008m_7270657520954574455gmail_msg"><br class="m_5810556598626227008m_7270657520954574455gmail_msg"><div style="margin-left:40px" class="m_5810556598626227008m_7270657520954574455gmail_msg">factory = util.BuildFactory()<br class="m_5810556598626227008m_7270657520954574455gmail_msg">factory.workdir = "O:\\Prj\\repo4"<br class="m_5810556598626227008m_7270657520954574455gmail_msg"># check out the source<br class="m_5810556598626227008m_7270657520954574455gmail_msg">factory.addStep(steps.Git(repo<wbr>url='git@git.example.net:repo4<wbr>', mode='incremental', branch='master'))<br class="m_5810556598626227008m_7270657520954574455gmail_msg"></div><br class="m_5810556598626227008m_7270657520954574455gmail_msg"></div><div class="m_5810556598626227008m_7270657520954574455gmail_msg">When I push a commit to repo1, repo2 or repo3, the build starts but fails immediately, the error from the log is: <br class="m_5810556598626227008m_7270657520954574455gmail_msg"></div><div class="m_5810556598626227008m_7270657520954574455gmail_msg"> <br class="m_5810556598626227008m_7270657520954574455gmail_msg" clear="all"><pre class="m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail-select-content m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail-log m_5810556598626227008m_7270657520954574455gmail_msg" style="margin-left:40px"><span class="m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail-no-wrap m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail-log_e m_5810556598626227008m_7270657520954574455gmail_msg"><span class="m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail- m_5810556598626227008m_7270657520954574455gmail_msg">fatal: Couldn't find remote ref dev<br class="m_5810556598626227008m_7270657520954574455gmail_msg"></span></span></pre><pre class="m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail-select-content m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail-log m_5810556598626227008m_7270657520954574455gmail_msg">It looks like buildbot keeps pulling from the dev branch,<br class="m_5810556598626227008m_7270657520954574455gmail_msg"></pre><pre class="m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail-select-content m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail-log m_5810556598626227008m_7270657520954574455gmail_msg">am I doing it right?<br class="m_5810556598626227008m_7270657520954574455gmail_msg"><br class="m_5810556598626227008m_7270657520954574455gmail_msg"></pre><pre class="m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail-select-content m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail-log m_5810556598626227008m_7270657520954574455gmail_msg">Thanks in advance<br class="m_5810556598626227008m_7270657520954574455gmail_msg"></pre><pre class="m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail-select-content m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail-log m_5810556598626227008m_7270657520954574455gmail_msg"><span class="m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail-no-wrap m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail-log_e m_5810556598626227008m_7270657520954574455gmail_msg"><span class="m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail- m_5810556598626227008m_7270657520954574455gmail_msg"></span></span></pre><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455m_-4048733259671409138gmail_signature m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><div class="m_5810556598626227008m_7270657520954574455gmail_msg"><span style="font-size:12.8px" class="m_5810556598626227008m_7270657520954574455gmail_msg">Song Tang</span></div></div></div></div></div></div>
</div></div></div></div></div></div></div></div></div></div>
______________________________<wbr>_________________<br class="m_5810556598626227008m_7270657520954574455gmail_msg">
users mailing list<br class="m_5810556598626227008m_7270657520954574455gmail_msg">
<a href="mailto:users@buildbot.net" class="m_5810556598626227008m_7270657520954574455gmail_msg" target="_blank">users@buildbot.net</a><br class="m_5810556598626227008m_7270657520954574455gmail_msg">
<a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" class="m_5810556598626227008m_7270657520954574455gmail_msg" target="_blank">https://lists.buildbot.net/mai<wbr>lman/listinfo/users</a></blockquote></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>