Bug 1076810 - RelEng CI tests should be available over the internet, not just from VPN,r=Callek
authorPeter Moore <pmoore@mozilla.com>
Tue, 06 Jan 2015 11:00:12 +0100
changeset 11628 222b655abc77b015f2e4f1ba450c1e75f976cf0b
parent 11627 93ac796aeca8f53b74df23ed3c0d3ff668d6f4a3
child 11629 a599d98c55de09bf0b902d8c588b0e0fd668984d
push id8464
push userpmoore@mozilla.com
push dateTue, 06 Jan 2015 10:03:37 +0000
reviewersCallek
bugs1076810
Bug 1076810 - RelEng CI tests should be available over the internet, not just from VPN,r=Callek
.gitignore
.hgignore
.travis.yml
README
README.md
tox.ini
tox_env.sh
new file mode 100644
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+.orig
+.pyc
+.pck
+.tox/
+twistd.pid
+twistd.log
+twistd.log.[0-9]+
+test-output
+
+BuildSlaves.py
+passwords.py
--- a/.hgignore
+++ b/.hgignore
@@ -1,11 +1,12 @@
 \.orig$
 \.pyc$
 \.pck$
+^\.tox
 twistd\.pid$
 twistd\.log$
 twistd\.log\.[0-9]+$
 test-output
 
 ^.*/BuildSlaves.py$
 ^.*/passwords.py$
 
new file mode 100644
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,24 @@
+language: python
+python:
+  - "2.7"
+
+install:
+  - pip install tox
+
+script:
+  - tox
+
+# currently cannot customise per user fork, see:
+# https://github.com/travis-ci/travis-ci/issues/1094
+# please comment out this section in your personal fork!
+notifications:
+  irc:
+    channels:
+      - "irc.mozilla.org#releng"
+    on_success: always
+    on_failure: always
+    template:
+      - "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message}"
+      - "Change view : %{compare_url}"
+      - "Build details : %{build_url}"
+      - "Commit message : %{commit_message}"
deleted file mode 100644
--- a/README
+++ /dev/null
@@ -1,1 +0,0 @@
-This is the production branch
new file mode 100644
--- /dev/null
+++ b/README.md
@@ -0,0 +1,84 @@
+# buildbot-configs
+This repository is a downstream read-only copy of:
+http://hg.mozilla.org/build/buildbot-configs/
+
+### Submitting changes
+We do not support the github Pull Request workflow, since github is only a downstream
+mirror for us. However, feel free to fork from us and make changes. Then, rather than
+submitting a pull request, please create a patch for your changes (capture the output
+of your changes using e.g. git diff) and attach the patch file to a Bugzilla bug,
+created in the following component:
+https://bugzilla.mozilla.org/enter_bug.cgi?product=Release%20Engineering&component=General%20Automation
+
+This bug will get triaged by us.
+
+### To run unit tests
+```
+pip install tox
+tox
+```
+
+### To run tests in travis
+Please note if you fork this repository and wish to run the tests in travis,
+you will need to enable your github fork in both travis and coveralls. In both
+cases you can log in with your github account, you do not need to set up a new
+one. To enable:
+* https://travis-ci.org/profile
+* https://coveralls.io/repos/new
+
+After enabling, you will need to push changes to your repo in order for a travis
+job to be triggered.
+
+### To match commits to upstream hg changesets
+Add this following section to the .git/config file in your local clone:
+```
+[remote "mozilla"]
+	url = git@github.com:mozilla/build-buildbot-configs
+	fetch = +refs/heads/*:refs/remotes/mozilla/*
+	fetch = +refs/notes/*:refs/notes/*
+```
+then to match a git commit to an upstream hg changeset:
+```
+git fetch mozilla
+git log
+```
+This will produce output like this:
+```
+commit 2fd4885606c72d72a8d7554918b39d6d7c9bf308
+Author: Peter Moore <pmoore@mozilla.com>
+Date:   Mon Dec 22 13:46:05 2014 +0100
+
+    Bug 1113255 - Generate FxOS pvtbuilds on m-c 3 hours earlier (at 0100 PT instead of 0400 PT),r=Bebe
+
+Notes:
+    Upstream source: https://hg.mozilla.org/build/buildbot-configs/rev/c5ee8731b724a5038b5af0818d3a19c70ad1338e
+
+commit 666973f3778824ee67feab5c7f8198c55e402e1d
+Author: Massimo Gervasini <mgervasini@mozilla.com>
+Date:   Mon Dec 22 13:10:37 2014 +0100
+
+    Bug 1113255 - Generate FxOS pvtbuilds on m-c at 1300,r=pmoore
+
+Notes:
+    Upstream source: https://hg.mozilla.org/build/buildbot-configs/rev/637b09eb1d144b2af42a0b72acfdc854db08aae6
+
+commit 52f6363345c4fefb1d8396bdf069b63d5633d4b9
+Author: Armen Zambrano Gasparnian <armenzg@mozilla.com>
+Date:   Fri Dec 19 15:46:10 2014 -0500
+
+    Bug 1112779 - Disable Mulet mochitest jobs on every tree except Try/Cedar. r=rail
+
+Notes:
+    Upstream source: https://hg.mozilla.org/build/buildbot-configs/rev/b545cad5b3cde80731be68b3a5a511e5684f3e43
+
+
+```
+This allows you to map a git commit SHA to an hg changeset SHA ("Upstream source").
+
+### Related repositories
+
+Please also see:
+* https://github.com/mozilla/build-buildbotcustom/
+* https://hg.mozilla.org/build/buildbot/ (not mirrored to github)
+
+Happy contributing! =)
new file mode 100644
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,33 @@
+[tox]
+envlist = py27
+skipsdist=True
+
+[testenv]
+basepython = python2.7
+
+setenv =
+    PYTHONPATH = {toxworkdir}:{toxworkdir}/tools/lib/python
+
+deps =
+    Jinja2==2.5.5
+    MySQL-python==1.2.3
+    SQLAlchemy==0.6.4
+    Twisted==10.1.0
+    amqplib==0.6.1
+    anyjson==0.3
+    argparse==1.1
+    carrot==0.10.7
+    distribute==0.6.14
+    pyOpenSSL==0.14
+    pyasn1==0.0.11a
+    pycrypto==2.3
+    pytz==2011d
+    wsgiref==0.1.2
+    zope.interface==3.6.1
+    MozillaPulse==0.80
+    pep8
+
+commands =
+    ./tox_env.sh "{toxinidir}" "{toxworkdir}"
+    ./test-masters.sh -e
+    pep8 --max-line-length=159 --exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,seamonkey,calendar,.tox
new file mode 100755
--- /dev/null
+++ b/tox_env.sh
@@ -0,0 +1,25 @@
+#!/bin/bash -e
+[ -z "${1}" ] || [ -z "${2}" ] && exit 1
+TOX_INI_DIR="${1}"
+TOX_WORK_DIR="${2}"
+
+function hgme {
+    repo="${1}"
+    if [ ! -d "${TOX_WORK_DIR}/${repo}" ]; then
+        hg clone https://hg.mozilla.org/build/${repo} "${TOX_WORK_DIR}/${repo}"
+    else
+        # this is equivalent to hg purge but doesn't require the hg purge plugin to be enabled
+        hg status -un0 -R "${TOX_WORK_DIR}/${repo}" | xargs rm -rf
+        hg pull -u -R "${TOX_WORK_DIR}/${repo}"
+    fi
+}
+
+hgme tools
+hgme buildbotcustom
+hgme buildbot
+
+hg -R "${TOX_WORK_DIR}/buildbot" checkout production-0.8
+cd "${TOX_WORK_DIR}/buildbot/master" && python setup.py install
+rm -rf "${TOX_INI_DIR}/test-output"
+rm -rf "${TOX_INI_DIR}/run/shm/buildbot"
+mkdir -p "${TOX_INI_DIR}/run/shm/buildbot"