From 7d6d68787fd9e10c81abfe8ec70ce9f8f8623142 Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Wed, 5 Mar 2014 08:14:52 +0300 Subject: buildbot: Create buildbot workdir, and do not backup bot .hgrc --- testing/buildbot.hosts | 2 +- testing/buildbot.yml | 26 +++++++++++++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) (limited to 'testing') diff --git a/testing/buildbot.hosts b/testing/buildbot.hosts index 05614f63..3e0be7d8 100644 --- a/testing/buildbot.hosts +++ b/testing/buildbot.hosts @@ -1 +1 @@ -localhost ansible_connection=local \ No newline at end of file +localhost ansible_connection=local builder=xxx pass=xxx \ No newline at end of file diff --git a/testing/buildbot.yml b/testing/buildbot.yml index d68cc59d..ee82343b 100644 --- a/testing/buildbot.yml +++ b/testing/buildbot.yml @@ -1,9 +1,16 @@ -# Ansible playbook to setup buildbot instance -# http://scons.org/wiki/InstallingBuildbotSlaves +# Ansible playbook to setup buildbot instance. +# Edit buildbot.hosts to set builder and pass variables. +# Then exec: +# +# ansible-playbook -i buildbot.hosts buildbot.yml # -# ansible-playbook -i buildbot.hosts buildbot.yml -e 'botuser=scons' +# botuser can be overridden from command line: # -# Tested with Ansible 1.5.0. Send questions to: +# ansible-playbook -i hosts buildbot.yml -e 'botuser=sconsy' +# +# Tested with Ansible 1.5.0, based on +# http://scons.org/wiki/InstallingBuildbotSlaves +# Send questions to: # # anatoly techtonik # @@ -15,6 +22,7 @@ - botuser: scons - hgrc: /home/{{ botuser }}/.hgrc - venv: /home/{{ botuser }}/buildbot-virtualenv + - work: /home/{{ botuser }}/buildbot-workdir tasks: # --- install requirements --- @@ -31,10 +39,14 @@ - file: path={{ hgrc }} owner={{ botuser }} state=touch when: not st.stat.exists - name: enable mercurial purge extension - ini_file: dest={{ hgrc }} backup=yes + ini_file: dest={{ hgrc }} section=extensions option=hgext.purge value= - # --- install buildbot --- - name: install buildbot-slave in virtualenv - pip: name=buildbot-slave virtualenv={{ venv }} + pip: name=buildbot-slave virtualenv={{ venv }} + + - name: create buildbot environment + command: "{{ venv }}/bin/buildslave create-slave --relocatable + {{ work }} buildbot.scons.org:9989 {{ builder }} {{ pass }} + creates={{ work }}" -- cgit v1.2.1