Bug 1494091: [mozharness] Remove unused selfserve module; r=Callek
authorTom Prince <mozilla@hocat.ca>
Mon, 01 Oct 2018 20:57:21 +0000
changeset 439263 d530d3abb3956a2d59636e109cc81aa78e9cc11d
parent 439262 2de25096cdd54c32488a4d5fdb1fefce6d1fb6db
child 439264 6f3b6219c3ff9a8f813f7546fb0fc30d2b99a2c5
push id70273
push usermozilla@hocat.ca
push dateTue, 02 Oct 2018 19:39:21 +0000
treeherderautoland@4ac7cfafd5d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek
bugs1494091
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1494091: [mozharness] Remove unused selfserve module; r=Callek This appears to be unused since https://hg.mozilla.org/mozilla-central/rev/6cc30b715da1 Differential Revision: https://phabricator.services.mozilla.com/D6821
testing/mozharness/configs/selfserve/production.py
testing/mozharness/configs/selfserve/staging.py
testing/mozharness/mozharness/mozilla/selfserve.py
deleted file mode 100644
--- a/testing/mozharness/configs/selfserve/production.py
+++ /dev/null
@@ -1,3 +0,0 @@
-config = {
-    "selfserve_url": "https://secure.pub.build.mozilla.org/buildapi/self-serve",
-}
deleted file mode 100644
--- a/testing/mozharness/configs/selfserve/staging.py
+++ /dev/null
@@ -1,3 +0,0 @@
-config = {
-    "selfserve_url": "https://secure-pub-build.allizom.org/buildapi/self-serve",
-}
deleted file mode 100644
--- a/testing/mozharness/mozharness/mozilla/selfserve.py
+++ /dev/null
@@ -1,47 +0,0 @@
-import json
-import site
-
-# SelfServeMixin {{{1
-class SelfServeMixin(object):
-    def _get_session(self):
-        site_packages_path = self.query_python_site_packages_path()
-        site.addsitedir(site_packages_path)
-        import requests
-        session = requests.Session()
-        adapter = requests.adapters.HTTPAdapter(max_retries=5)
-        session.mount("http://", adapter)
-        session.mount("https://", adapter)
-        return session
-
-    def _get_base_url(self):
-        return self.config["selfserve_url"].rstrip("/")
-
-    def trigger_nightly_builds(self, branch, revision, auth):
-        session = self._get_session()
-
-        selfserve_base = self._get_base_url()
-        url = "%s/%s/rev/%s/nightly" % (selfserve_base, branch, revision)
-
-        data = {
-            "revision": revision,
-        }
-        self.info("Triggering nightly builds via %s" % url)
-        return session.post(url, data=data, auth=auth).raise_for_status()
-
-    def trigger_arbitrary_job(self, builder, branch, revision, auth, files=None):
-        session = self._get_session()
-
-        selfserve_base = self._get_base_url()
-        url = "%s/%s/builders/%s/%s" % (selfserve_base, branch, builder, revision)
-
-        data = {
-            "properties": json.dumps({
-                "branch": branch,
-                "revision": revision
-            }),
-        }
-        if files:
-            data["files"] = json.dumps(files)
-
-        self.info("Triggering arbritrary job at %s" % url)
-        return session.post(url, data=data, auth=auth).raise_for_status()