Bug 1494091: [mozharness] Remove unused selfserve module; r=Callek
authorTom Prince <mozilla@hocat.ca>
Mon, 01 Oct 2018 20:57:21 +0000
changeset 450409 5ee69edd0d36672524f281715c374bd89bb7f07a
parent 450408 17080c9eff21e3fe3d011b8dc41de1e1eb4940a9
child 450410 66451dbb0e8abd370e4008b3cbaa86f23d4ee7a9
push id234
push usermozilla@hocat.ca
push dateSat, 10 Nov 2018 00:08:05 +0000
treeherdermozilla-esr60@f2569ad7bd92 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek
bugs1494091
milestone60.3.1
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()