-
-
Save tahnok/4383fa23b7163c26e373 to your computer and use it in GitHub Desktop.
buildbot madness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## The Error Log | |
(view as text) | |
git --version | |
in dir /home/wes/sys/slave/runtests/build (timeout 1200 secs) | |
watching logfiles {} | |
argv: ['git', '--version'] | |
environment: | |
BYOBU_ACCENT=#75507B | |
BYOBU_BACKEND=tmux | |
BYOBU_CONFIG_DIR=/home/wes/.byobu | |
BYOBU_DARK=black | |
BYOBU_HIGHLIGHT=#DD4814 | |
BYOBU_LIGHT=white | |
BYOBU_PAGER=sensible-pager | |
BYOBU_PREFIX=/usr | |
BYOBU_READLINK=readlink | |
BYOBU_RUN_DIR=/dev/shm/byobu-wes-drW19xfG | |
BYOBU_SED=sed | |
COLORTERM=gnome-terminal | |
COMPIZ_CONFIG_PROFILE=ubuntu | |
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-zb3wQhUl3I,guid=f40038838aeafce79303b08b0000002b | |
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path | |
DESKTOP_SESSION=ubuntu | |
DISPLAY=:0 | |
EDITOR=/usr/local/bin/emacs | |
GDMSESSION=ubuntu | |
GNOME_DESKTOP_SESSION_ID=this-is-deprecated | |
GNOME_KEYRING_CONTROL=/tmp/keyring-eRaeqc | |
GNOME_KEYRING_PID=1812 | |
GPG_AGENT_INFO=/tmp/keyring-eRaeqc/gpg:0:1 | |
GREP_COLOR=1;32 | |
GREP_OPTIONS=--color=auto | |
HOME=/home/wes | |
LANG=en_CA.UTF-8 | |
LANGUAGE=en_CA:en | |
LC_CTYPE=en_CA.UTF-8 | |
LOGNAME=wes | |
LSCOLORS=Gxfxcxdxbxegedabagacad | |
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path | |
OLDPWD=/home/wes | |
PAGER=less -R | |
PATH=/home/wes/.virtualenvs/rb/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games | |
PIP_RESPECT_VIRTUALENV=true | |
PIP_VIRTUALENV_BASE=/home/wes/.virtualenvs | |
PS1=(rb)%{$fg_bold[red]%}»%{$fg_bold[green]%}%p %{$fg[cyan]%}%3c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}%{$reset_color%} | |
PWD=/home/wes/sys/slave/runtests/build | |
SESSION_MANAGER=local/tahuti:@/tmp/.ICE-unix/1823,unix/tahuti:/tmp/.ICE-unix/1823 | |
SHELL=/usr/bin/zsh | |
SHLVL=1 | |
SSH_AGENT_PID=1858 | |
SSH_AUTH_SOCK=/tmp/keyring-eRaeqc/ssh | |
TERM=screen | |
TMUX=/tmp//tmux-1000/default,2612,0 | |
TMUX_PANE=%7 | |
UBUNTU_MENUPROXY=libappmenu.so | |
USER=wes | |
VIRTUALENVWRAPPER_HOOK_DIR=/home/wes/.virtualenvs | |
VIRTUALENVWRAPPER_LOG_DIR=/home/wes/.virtualenvs | |
VIRTUALENVWRAPPER_PROJECT_FILENAME=.project | |
VIRTUAL_ENV=/home/wes/.virtualenvs/rb | |
WINDOWID=67108870 | |
WORKON_HOME=/home/wes/.virtualenvs | |
XAUTHORITY=/home/wes/.Xauthority | |
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg | |
XDG_CURRENT_DESKTOP=Unity | |
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/ | |
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 | |
XDG_SESSION_COOKIE=914d75ddab887b9a17a8a4af00000007-1352927324.913593-1570052594 | |
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 | |
_=/home/wes/.virtualenvs/rb/bin/buildslave | |
using PTY: False | |
git version 1.7.9.5 | |
program finished with exit code 0 | |
elapsedTime=0.007607 | |
program finished with exit code 0 | |
git cat-file -e 95cab4623a30e62eea008d7579cc124c2098fc9f | |
in dir /home/wes/sys/slave/runtests/build (timeout 1200 secs) | |
watching logfiles {} | |
argv: ['git', 'cat-file', '-e', '95cab4623a30e62eea008d7579cc124c2098fc9f'] | |
environment: | |
BYOBU_ACCENT=#75507B | |
BYOBU_BACKEND=tmux | |
BYOBU_CONFIG_DIR=/home/wes/.byobu | |
BYOBU_DARK=black | |
BYOBU_HIGHLIGHT=#DD4814 | |
BYOBU_LIGHT=white | |
BYOBU_PAGER=sensible-pager | |
BYOBU_PREFIX=/usr | |
BYOBU_READLINK=readlink | |
BYOBU_RUN_DIR=/dev/shm/byobu-wes-drW19xfG | |
BYOBU_SED=sed | |
COLORTERM=gnome-terminal | |
COMPIZ_CONFIG_PROFILE=ubuntu | |
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-zb3wQhUl3I,guid=f40038838aeafce79303b08b0000002b | |
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path | |
DESKTOP_SESSION=ubuntu | |
DISPLAY=:0 | |
EDITOR=/usr/local/bin/emacs | |
GDMSESSION=ubuntu | |
GNOME_DESKTOP_SESSION_ID=this-is-deprecated | |
GNOME_KEYRING_CONTROL=/tmp/keyring-eRaeqc | |
GNOME_KEYRING_PID=1812 | |
GPG_AGENT_INFO=/tmp/keyring-eRaeqc/gpg:0:1 | |
GREP_COLOR=1;32 | |
GREP_OPTIONS=--color=auto | |
HOME=/home/wes | |
LANG=en_CA.UTF-8 | |
LANGUAGE=en_CA:en | |
LC_CTYPE=en_CA.UTF-8 | |
LOGNAME=wes | |
LSCOLORS=Gxfxcxdxbxegedabagacad | |
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path | |
OLDPWD=/home/wes | |
PAGER=less -R | |
PATH=/home/wes/.virtualenvs/rb/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games | |
PIP_RESPECT_VIRTUALENV=true | |
PIP_VIRTUALENV_BASE=/home/wes/.virtualenvs | |
PS1=(rb)%{$fg_bold[red]%}»%{$fg_bold[green]%}%p %{$fg[cyan]%}%3c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}%{$reset_color%} | |
PWD=/home/wes/sys/slave/runtests/build | |
SESSION_MANAGER=local/tahuti:@/tmp/.ICE-unix/1823,unix/tahuti:/tmp/.ICE-unix/1823 | |
SHELL=/usr/bin/zsh | |
SHLVL=1 | |
SSH_AGENT_PID=1858 | |
SSH_AUTH_SOCK=/tmp/keyring-eRaeqc/ssh | |
TERM=screen | |
TMUX=/tmp//tmux-1000/default,2612,0 | |
TMUX_PANE=%7 | |
UBUNTU_MENUPROXY=libappmenu.so | |
USER=wes | |
VIRTUALENVWRAPPER_HOOK_DIR=/home/wes/.virtualenvs | |
VIRTUALENVWRAPPER_LOG_DIR=/home/wes/.virtualenvs | |
VIRTUALENVWRAPPER_PROJECT_FILENAME=.project | |
VIRTUAL_ENV=/home/wes/.virtualenvs/rb | |
WINDOWID=67108870 | |
WORKON_HOME=/home/wes/.virtualenvs | |
XAUTHORITY=/home/wes/.Xauthority | |
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg | |
XDG_CURRENT_DESKTOP=Unity | |
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/ | |
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 | |
XDG_SESSION_COOKIE=914d75ddab887b9a17a8a4af00000007-1352927324.913593-1570052594 | |
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 | |
_=/home/wes/.virtualenvs/rb/bin/buildslave | |
using PTY: False | |
program finished with exit code 0 | |
elapsedTime=0.009791 | |
git reset --hard 95cab4623a30e62eea008d7579cc124c2098fc9f | |
in dir /home/wes/sys/slave/runtests/build (timeout 1200 secs) | |
watching logfiles {} | |
argv: ['git', 'reset', '--hard', '95cab4623a30e62eea008d7579cc124c2098fc9f'] | |
environment: | |
BYOBU_ACCENT=#75507B | |
BYOBU_BACKEND=tmux | |
BYOBU_CONFIG_DIR=/home/wes/.byobu | |
BYOBU_DARK=black | |
BYOBU_HIGHLIGHT=#DD4814 | |
BYOBU_LIGHT=white | |
BYOBU_PAGER=sensible-pager | |
BYOBU_PREFIX=/usr | |
BYOBU_READLINK=readlink | |
BYOBU_RUN_DIR=/dev/shm/byobu-wes-drW19xfG | |
BYOBU_SED=sed | |
COLORTERM=gnome-terminal | |
COMPIZ_CONFIG_PROFILE=ubuntu | |
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-zb3wQhUl3I,guid=f40038838aeafce79303b08b0000002b | |
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path | |
DESKTOP_SESSION=ubuntu | |
DISPLAY=:0 | |
EDITOR=/usr/local/bin/emacs | |
GDMSESSION=ubuntu | |
GNOME_DESKTOP_SESSION_ID=this-is-deprecated | |
GNOME_KEYRING_CONTROL=/tmp/keyring-eRaeqc | |
GNOME_KEYRING_PID=1812 | |
GPG_AGENT_INFO=/tmp/keyring-eRaeqc/gpg:0:1 | |
GREP_COLOR=1;32 | |
GREP_OPTIONS=--color=auto | |
HOME=/home/wes | |
LANG=en_CA.UTF-8 | |
LANGUAGE=en_CA:en | |
LC_CTYPE=en_CA.UTF-8 | |
LOGNAME=wes | |
LSCOLORS=Gxfxcxdxbxegedabagacad | |
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path | |
OLDPWD=/home/wes | |
PAGER=less -R | |
PATH=/home/wes/.virtualenvs/rb/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games | |
PIP_RESPECT_VIRTUALENV=true | |
PIP_VIRTUALENV_BASE=/home/wes/.virtualenvs | |
PS1=(rb)%{$fg_bold[red]%}»%{$fg_bold[green]%}%p %{$fg[cyan]%}%3c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}%{$reset_color%} | |
PWD=/home/wes/sys/slave/runtests/build | |
SESSION_MANAGER=local/tahuti:@/tmp/.ICE-unix/1823,unix/tahuti:/tmp/.ICE-unix/1823 | |
SHELL=/usr/bin/zsh | |
SHLVL=1 | |
SSH_AGENT_PID=1858 | |
SSH_AUTH_SOCK=/tmp/keyring-eRaeqc/ssh | |
TERM=screen | |
TMUX=/tmp//tmux-1000/default,2612,0 | |
TMUX_PANE=%7 | |
UBUNTU_MENUPROXY=libappmenu.so | |
USER=wes | |
VIRTUALENVWRAPPER_HOOK_DIR=/home/wes/.virtualenvs | |
VIRTUALENVWRAPPER_LOG_DIR=/home/wes/.virtualenvs | |
VIRTUALENVWRAPPER_PROJECT_FILENAME=.project | |
VIRTUAL_ENV=/home/wes/.virtualenvs/rb | |
WINDOWID=67108870 | |
WORKON_HOME=/home/wes/.virtualenvs | |
XAUTHORITY=/home/wes/.Xauthority | |
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg | |
XDG_CURRENT_DESKTOP=Unity | |
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/ | |
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 | |
XDG_SESSION_COOKIE=914d75ddab887b9a17a8a4af00000007-1352927324.913593-1570052594 | |
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 | |
_=/home/wes/.virtualenvs/rb/bin/buildslave | |
using PTY: False | |
HEAD is now at 95cab46 Generate url dynamically. | |
program finished with exit code 0 | |
elapsedTime=0.036322 | |
git apply --index -p 0 | |
in dir /home/wes/sys/slave/runtests/build (timeout 1200 secs) | |
watching logfiles {} | |
argv: ['git', 'apply', '--index', '-p', '0'] | |
environment: | |
BYOBU_ACCENT=#75507B | |
BYOBU_BACKEND=tmux | |
BYOBU_CONFIG_DIR=/home/wes/.byobu | |
BYOBU_DARK=black | |
BYOBU_HIGHLIGHT=#DD4814 | |
BYOBU_LIGHT=white | |
BYOBU_PAGER=sensible-pager | |
BYOBU_PREFIX=/usr | |
BYOBU_READLINK=readlink | |
BYOBU_RUN_DIR=/dev/shm/byobu-wes-drW19xfG | |
BYOBU_SED=sed | |
COLORTERM=gnome-terminal | |
COMPIZ_CONFIG_PROFILE=ubuntu | |
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-zb3wQhUl3I,guid=f40038838aeafce79303b08b0000002b | |
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path | |
DESKTOP_SESSION=ubuntu | |
DISPLAY=:0 | |
EDITOR=/usr/local/bin/emacs | |
GDMSESSION=ubuntu | |
GNOME_DESKTOP_SESSION_ID=this-is-deprecated | |
GNOME_KEYRING_CONTROL=/tmp/keyring-eRaeqc | |
GNOME_KEYRING_PID=1812 | |
GPG_AGENT_INFO=/tmp/keyring-eRaeqc/gpg:0:1 | |
GREP_COLOR=1;32 | |
GREP_OPTIONS=--color=auto | |
HOME=/home/wes | |
LANG=en_CA.UTF-8 | |
LANGUAGE=en_CA:en | |
LC_CTYPE=en_CA.UTF-8 | |
LOGNAME=wes | |
LSCOLORS=Gxfxcxdxbxegedabagacad | |
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path | |
OLDPWD=/home/wes | |
PAGER=less -R | |
PATH=/home/wes/.virtualenvs/rb/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games | |
PIP_RESPECT_VIRTUALENV=true | |
PIP_VIRTUALENV_BASE=/home/wes/.virtualenvs | |
PS1=(rb)%{$fg_bold[red]%}»%{$fg_bold[green]%}%p %{$fg[cyan]%}%3c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}%{$reset_color%} | |
PWD=/home/wes/sys/slave/runtests/build | |
SESSION_MANAGER=local/tahuti:@/tmp/.ICE-unix/1823,unix/tahuti:/tmp/.ICE-unix/1823 | |
SHELL=/usr/bin/zsh | |
SHLVL=1 | |
SSH_AGENT_PID=1858 | |
SSH_AUTH_SOCK=/tmp/keyring-eRaeqc/ssh | |
TERM=screen | |
TMUX=/tmp//tmux-1000/default,2612,0 | |
TMUX_PANE=%7 | |
UBUNTU_MENUPROXY=libappmenu.so | |
USER=wes | |
VIRTUALENVWRAPPER_HOOK_DIR=/home/wes/.virtualenvs | |
VIRTUALENVWRAPPER_LOG_DIR=/home/wes/.virtualenvs | |
VIRTUALENVWRAPPER_PROJECT_FILENAME=.project | |
VIRTUAL_ENV=/home/wes/.virtualenvs/rb | |
WINDOWID=67108870 | |
WORKON_HOME=/home/wes/.virtualenvs | |
XAUTHORITY=/home/wes/.Xauthority | |
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg | |
XDG_CURRENT_DESKTOP=Unity | |
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/ | |
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 | |
XDG_SESSION_COOKIE=914d75ddab887b9a17a8a4af00000007-1352927324.913593-1570052594 | |
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 | |
_=/home/wes/.virtualenvs/rb/bin/buildslave | |
writing 9996 bytes to stdin | |
using PTY: False | |
fatal: git apply: bad git-diff - inconsistent new filename on line 15 | |
program finished with exit code 128 | |
elapsedTime=0.012014 | |
## The Patch | |
(view as text) | |
From 7f344fa957c82cad954e8ce0a8e2a98b9cc4789b Mon Sep 17 00:00:00 2001 | |
From: Wesley Ellis <tahnok@gmail.com> | |
Date: Tue, 30 Oct 2012 12:13:34 -0400 | |
Subject: [PATCH 1/4] first post | |
--- | |
bot/reviewbot/tools/builtbot.py | 49 +++++++++++++++++++++++++++++++++++++++ | |
1 file changed, 49 insertions(+) | |
create mode 100644 bot/reviewbot/tools/builtbot.py | |
diff --git a/bot/reviewbot/tools/builtbot.py b/bot/reviewbot/tools/builtbot.py | |
new file mode 100644 | |
index 0000000..666244c | |
--- /dev/null | |
+++ b/bot/reviewbot/tools/builtbot.py | |
@@ -0,0 +1,49 @@ | |
+from reviewbot.tools.process import execute | |
+from reviewbot.tools import Tool | |
+ | |
+ | |
+class builtbot(Tool): | |
+ name = 'BuilBot try plugin' | |
+ version = '0.0' | |
+ description = "Attempt to build given diff on your buildbot servers" | |
+ options = [ | |
+ # Buildmaster, run automatically, username, password, port, | |
+ { | |
+ 'name': 'max_line_length', | |
+ 'field_type': 'django.forms.IntegerField', | |
+ 'default': 79, | |
+ 'field_options': { | |
+ 'label': 'Maximum Line Length', | |
+ 'help_text': 'The maximum line length PEP8 will check for.', | |
+ 'required': True, | |
+ }, | |
+ }, | |
+ ] | |
+ | |
+ def handle_file(self, f): | |
+ if not f.dest_file.endswith('.py'): | |
+ # Ignore the file. | |
+ return False | |
+ | |
+ path = f.get_patched_file_path() | |
+ if not path: | |
+ return False | |
+ | |
+ output = execute( | |
+ [ | |
+ 'pep8', | |
+ '-r', | |
+ '--max-line-length=%i' % self.settings['max_line_length'], | |
+ path | |
+ ], | |
+ split_lines=True, | |
+ ignore_errors=True) | |
+ | |
+ for line in output: | |
+ parsed = line.split(':') | |
+ lnum = int(parsed[1]) | |
+ col = int(parsed[2]) | |
+ msg = parsed[3] | |
+ f.comment('Col: %s\n%s' % (col, msg), lnum) | |
+ | |
+ return True | |
-- | |
1.7.9.5 | |
From 084b8d45470426478ddb88c44eb37b54e0929b01 Mon Sep 17 00:00:00 2001 | |
From: Wesley Ellis <tahnok@gmail.com> | |
Date: Mon, 5 Nov 2012 19:22:37 -0500 | |
Subject: [PATCH 2/4] settings | |
--- | |
bot/reviewbot/tools/builtbot.py | 45 +++++++++++++-------------------------- | |
1 file changed, 15 insertions(+), 30 deletions(-) | |
diff --git a/bot/reviewbot/tools/builtbot.py b/bot/reviewbot/tools/builtbot.py | |
index 666244c..5267c27 100644 | |
--- a/bot/reviewbot/tools/builtbot.py | |
+++ b/bot/reviewbot/tools/builtbot.py | |
@@ -7,43 +7,28 @@ class builtbot(Tool): | |
version = '0.0' | |
description = "Attempt to build given diff on your buildbot servers" | |
options = [ | |
- # Buildmaster, run automatically, username, password, port, | |
+ # Buildmaster, username, password, port, ssh | |
{ | |
- 'name': 'max_line_length', | |
- 'field_type': 'django.forms.IntegerField', | |
- 'default': 79, | |
+ 'name': 'buildmaster_address', | |
+ 'field_type': 'django.forms.CharField', | |
+ 'default': None, | |
'field_options': { | |
- 'label': 'Maximum Line Length', | |
- 'help_text': 'The maximum line length PEP8 will check for.', | |
+ 'label': 'Buildmaster Address', | |
+ 'help_text': 'The address of the buildmaster.', | |
'required': True, | |
}, | |
}, | |
] | |
- def handle_file(self, f): | |
- if not f.dest_file.endswith('.py'): | |
- # Ignore the file. | |
- return False | |
- | |
- path = f.get_patched_file_path() | |
- if not path: | |
- return False | |
- | |
+ def execute(self): | |
+ #do work | |
output = execute( | |
[ | |
- 'pep8', | |
- '-r', | |
- '--max-line-length=%i' % self.settings['max_line_length'], | |
- path | |
- ], | |
- split_lines=True, | |
- ignore_errors=True) | |
- | |
- for line in output: | |
- parsed = line.split(':') | |
- lnum = int(parsed[1]) | |
- col = int(parsed[2]) | |
- msg = parsed[3] | |
- f.comment('Col: %s\n%s' % (col, msg), lnum) | |
+ 'buildbot', | |
+ 'try', | |
+ '---host %s' % self.settings['host'], | |
+ '', | |
+ '--diff=- %s' % self.review.diff | |
+ ]) | |
- return True | |
+ self.review.body_top = "Result: %s\n%s" % "Result", self.review.body_top | |
\ No newline at end of file | |
-- | |
1.7.9.5 | |
From 1eff0d1bb60106f480998879bfbd9ed870de2ef2 Mon Sep 17 00:00:00 2001 | |
From: Wesley Ellis <tahnok@gmail.com> | |
Date: Mon, 12 Nov 2012 16:35:16 -0500 | |
Subject: [PATCH 3/4] working settings | |
--- | |
bot/reviewbot/tools/buildbot.py | 67 +++++++++++++++++++++++++++++++++++++++ | |
bot/reviewbot/tools/builtbot.py | 34 -------------------- | |
bot/setup.py | 1 + | |
3 files changed, 68 insertions(+), 34 deletions(-) | |
create mode 100644 bot/reviewbot/tools/buildbot.py | |
delete mode 100644 bot/reviewbot/tools/builtbot.py | |
diff --git a/bot/reviewbot/tools/buildbot.py b/bot/reviewbot/tools/buildbot.py | |
new file mode 100644 | |
index 0000000..891cf48 | |
--- /dev/null | |
+++ b/bot/reviewbot/tools/buildbot.py | |
@@ -0,0 +1,67 @@ | |
+from reviewbot.tools.process import execute | |
+from reviewbot.tools import Tool | |
+ | |
+ | |
+class buildbot(Tool): | |
+ name = 'BuilBot try plugin' | |
+ version = '0.1.1' | |
+ description = "Attempt to build given diff on your buildbot servers" | |
+ options = [ | |
+ # Buildmaster, username, password, port, ssh | |
+ { | |
+ 'name': 'buildmaster_address', | |
+ 'field_type': 'django.forms.CharField', | |
+ 'default': None, | |
+ 'field_options': { | |
+ 'label': 'Buildmaster Address', | |
+ 'help_text': 'The address of the buildmaster.', | |
+ 'required': True, | |
+ }, | |
+ }, | |
+ { | |
+ 'name': 'port', | |
+ 'field_type': 'django.forms.CharField', | |
+ 'default': None, | |
+ 'field_options': { | |
+ 'label': 'PB port', | |
+ 'help_text': 'PB port', | |
+ 'required': True, | |
+ }, | |
+ }, | |
+ { | |
+ 'name': 'username', | |
+ 'field_type': 'django.forms.CharField', | |
+ 'default': None, | |
+ 'field_options': { | |
+ 'label': 'PB username', | |
+ 'help_text': 'Username', | |
+ 'required': True, | |
+ }, | |
+ }, | |
+ { | |
+ 'name': 'password', | |
+ 'field_type': 'django.forms.CharField', | |
+ 'default': None, | |
+ 'field_options': { | |
+ 'label': 'PB Password', | |
+ 'help_text': 'PB Password: improperly stored. Use with caution', | |
+ 'required': True, | |
+ }, | |
+ }, | |
+ ] | |
+ | |
+ def execute(self): | |
+ #do work | |
+ output = execute( | |
+ [ | |
+ 'buildbot', | |
+ 'try', | |
+ '--wait', | |
+ '--connect=pb', | |
+ '--username=user', | |
+ '--master=127.0.0.1:8031', | |
+ '--passwd=pass', | |
+ '--diff=-' | |
+ ]) | |
+ | |
+ self.review.body_top = "Result: %s\n%s" % "Result", self.review.body_top | |
\ No newline at end of file | |
diff --git a/bot/reviewbot/tools/builtbot.py b/bot/reviewbot/tools/builtbot.py | |
deleted file mode 100644 | |
index 5267c27..0000000 | |
--- a/bot/reviewbot/tools/builtbot.py | |
+++ /dev/null | |
@@ -1,34 +0,0 @@ | |
-from reviewbot.tools.process import execute | |
-from reviewbot.tools import Tool | |
- | |
- | |
-class builtbot(Tool): | |
- name = 'BuilBot try plugin' | |
- version = '0.0' | |
- description = "Attempt to build given diff on your buildbot servers" | |
- options = [ | |
- # Buildmaster, username, password, port, ssh | |
- { | |
- 'name': 'buildmaster_address', | |
- 'field_type': 'django.forms.CharField', | |
- 'default': None, | |
- 'field_options': { | |
- 'label': 'Buildmaster Address', | |
- 'help_text': 'The address of the buildmaster.', | |
- 'required': True, | |
- }, | |
- }, | |
- ] | |
- | |
- def execute(self): | |
- #do work | |
- output = execute( | |
- [ | |
- 'buildbot', | |
- 'try', | |
- '---host %s' % self.settings['host'], | |
- '', | |
- '--diff=- %s' % self.review.diff | |
- ]) | |
- | |
- self.review.body_top = "Result: %s\n%s" % "Result", self.review.body_top | |
\ No newline at end of file | |
diff --git a/bot/setup.py b/bot/setup.py | |
index 414e908..5cf600a 100755 | |
--- a/bot/setup.py | |
+++ b/bot/setup.py | |
@@ -17,6 +17,7 @@ setup( | |
], | |
'reviewbot.tools': [ | |
'pep8 = reviewbot.tools.pep8:pep8Tool', | |
+ 'buildbot = reviewbot.tools.buildbot:buildbot', | |
], | |
}, | |
install_requires=[ | |
-- | |
1.7.9.5 | |
From 1e1864c5d64c5decb02b61d9c4684af6ebc5d940 Mon Sep 17 00:00:00 2001 | |
From: Wesley Ellis <tahnok@gmail.com> | |
Date: Thu, 15 Nov 2012 10:07:04 -0500 | |
Subject: [PATCH 4/4] test commit | |
--- | |
bot/reviewbot/tools/buildbot.py | 10 ++++++++++ | |
1 file changed, 10 insertions(+) | |
create mode 100644 a | |
diff --git a/a b/a | |
new file mode 100644 | |
index 0000000..e69de29 | |
diff --git a/bot/reviewbot/tools/buildbot.py b/bot/reviewbot/tools/buildbot.py | |
index 891cf48..76cdb06 100644 | |
--- a/bot/reviewbot/tools/buildbot.py | |
+++ b/bot/reviewbot/tools/buildbot.py | |
@@ -19,6 +19,16 @@ class buildbot(Tool): | |
}, | |
}, | |
{ | |
+ 'name': 'use_ssh', | |
+ 'field_type': 'django.forms.BooleanFields', | |
+ 'default': True, | |
+ 'field_options': { | |
+ 'label': 'Use SSH authentication to buildbot?', | |
+ 'help_text': 'Setting this to false will use PB style authentication instead' | |
+ 'required': True, | |
+ } | |
+ }, | |
+ { | |
'name': 'port', | |
'field_type': 'django.forms.CharField', | |
'default': None, | |
-- | |
1.7.9.5 | |
## The commands | |
to create patch: | |
git format-patch master --stdout > fix_empty_poster.patch | |
to start build: | |
buildbot try --wait --connect=pb --username=user --master=127.0.0.1:8031 --passwd=pass --diff=fix_empty_poster.patch --baserev=95cab4623a30e62eea008d7579cc124c2098fc9f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment