Remove YAML logic from DEB cache and templates 97/62097/4
authorAlok Anand <alok4nand@gmail.com>
Mon, 21 Aug 2017 16:39:18 +0000 (22:09 +0530)
committerDaniel Farrell <dfarrell@redhat.com>
Mon, 21 Aug 2017 21:57:03 +0000 (21:57 +0000)
As the YAML logic has been removed from building DEB packages these
functionalities are no more relevant.

Change-Id: Idaa1949bdf5023700aae7a0bd56510ee0c563155
Signed-off-by: Alok Anand <alok4nand@gmail.com>
packages/deb/build_vars.yaml [deleted file]
packages/deb/cache/cache.py
packages/deb/templates/build_debianfiles.py
packages/requirements.txt

diff --git a/packages/deb/build_vars.yaml b/packages/deb/build_vars.yaml
deleted file mode 100644 (file)
index a12e4cf..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-# Variables that define OpenDaylight's .deb builds
-# Consumed by Python logic to render Jinja2 templates into debian files
-# Each build should define:
-# version_major:
-#   The OpenDaylight major (element) version number of the release to build
-# version_minor:
-#   The OpenDaylight minor (SR) version number of the release to build
-# version_patch:
-#   The OpenDaylight patch version of the release to build (unused pending CR)
-# pkg_version:
-#   Deb version for the given ODL major.minor.patch
-# sysd_commit:
-#   Version of ODL systemd unitfile to download and package in ODL .deb
-# codename:
-#   Elemental codename for the ODL release, including SR if applicable
-# download_url:
-#   URL to ODL tarball artifact to repackage into .deb
-# java_version:
-#   Java dependency for the ODL release
-# changelog_date:
-#   Date this .deb was defined
-# changelog_time:
-#   Time this .deb was defined
-# changelog_name:
-#   Name of person who defined .deb
-# changelog_email:
-#   Email of person who defined .deb
-
----
-builds:
-  - version_major: "4"
-    version_minor: "2"
-    version_patch: "0"
-    pkg_version: "1"
-    sysd_commit: 07f7c83b0ef46ad3809e5be03e09a77fe554eeae
-    codename: Beryllium-SR2
-    download_url: "https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.4.2-Beryllium-SR2/distribution-karaf-0.4.2-Beryllium-SR2.tar.gz"
-    changelog_date: "Wed, 11 May 2016"
-    java_version: "7"
-    changelog_time: "17:48:42 +0530"
-    changelog_name: "Akshita Jha"
-    changelog_email: "zenith158@gmail.com"
-  - version_major: "4"
-    version_minor: "3"
-    version_patch: "0"
-    pkg_version: "1"
-    sysd_commit: 07f7c83b0ef46ad3809e5be03e09a77fe554eeae
-    codename: Beryllium-SR3
-    download_url: "https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.4.3-Beryllium-SR3/distribution-karaf-0.4.3-Beryllium-SR3.tar.gz"
-    java_version: "7"
-    changelog_date: "Tue, 26 Jul 2016"
-    changelog_time: "17:48:42 +0530"
-    changelog_name: "Daniel Farrell"
-    changelog_email: "dfarrell@redhat.com"
-  - version_major: "4"
-    version_minor: "4"
-    version_patch: "0"
-    pkg_version: "1"
-    sysd_commit: 07f7c83b0ef46ad3809e5be03e09a77fe554eeae
-    codename: Beryllium-SR4
-    download_url: "https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/0.4.4-Beryllium-SR4/distribution-karaf-0.4.4-Beryllium-SR4.tar.gz"
-    java_version: "7"
-    changelog_date: "Wed, 16 Nov 2016"
-    changelog_time: "01:40:00 +0100"
-    changelog_name: "Michal Skalski"
-    changelog_email: "mskalski@mirantis.com"
-  - version_major: "5"
-    version_minor: "0"
-    version_patch: "0"
-    pkg_version: "1"
-    codename: Boron
-    download_url: "https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/0.5.0-Boron/distribution-karaf-0.5.0-Boron.tar.gz"
-    sysd_commit: 07f7c83b0ef46ad3809e5be03e09a77fe554eeae
-    java_version: "8"
-    changelog_date: "Wed, 16 Nov 2016"
-    changelog_time: "01:40:00 +0100"
-    changelog_name: "Michal Skalski"
-    changelog_email: "mskalski@mirantis.com"
-  - version_major: "5"
-    version_minor: "1"
-    version_patch: "0"
-    pkg_version: "1"
-    codename: Boron-SR1
-    download_url: "https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/0.5.1-Boron-SR1/distribution-karaf-0.5.1-Boron-SR1.tar.gz"
-    sysd_commit: 07f7c83b0ef46ad3809e5be03e09a77fe554eeae
-    java_version: "8"
-    changelog_date: "Wed, 16 Nov 2016"
-    changelog_time: "01:40:00 +0100"
-    changelog_name: "Michal Skalski"
-    changelog_email: "mskalski@mirantis.com"
-  - version_major: "5"
-    version_minor: "2"
-    version_patch: "0"
-    pkg_version: "1"
-    codename: Boron-SR2
-    download_url: "https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/0.5.2-Boron-SR2/distribution-karaf-0.5.2-Boron-SR2.tar.gz"
-    sysd_commit: 07f7c83b0ef46ad3809e5be03e09a77fe554eeae
-    java_version: "8"
-    changelog_date: "Wed, 23 Dec 2016"
-    changelog_time: "12:02:00 +0200"
-    changelog_name: "Romanos Skiadas"
-    changelog_email: "rski@intracom-telecom.com"
-  - version_major: "6"
-    version_minor: "0"
-    version_patch: "0"
-    pkg_version: "1"
-    codename: Carbon
-    download_url: "https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/0.6.0-Carbon/distribution-karaf-0.6.0-Carbon.tar.gz"
-    sysd_commit: 07f7c83b0ef46ad3809e5be03e09a77fe554eeae
-    java_version: "8"
-    changelog_date: "Sat, 27 May 2017"
-    changelog_time: "20:30:00 +0530"
-    changelog_name: "Akshita Jha"
-    changelog_email: "zenith158@gmail.com"
index e2fd8b23f53dc625c3506d15d7179dc0924252d3..09befaedd0d59e47e8878ce116df55dfd004ab69 100755 (executable)
@@ -1,17 +1,9 @@
 #!/usr/bin/env python
-"""Read YAML description of ODL builds and cache the required artifacts."""
+"""Cache the required artifacts for building DEB packages."""
 
 import os
-import sys
 import urllib
 
-try:
-    import yaml
-except ImportError:
-    sys.stderr.write("We recommend using our included Vagrant env.\n")
-    sys.stderr.write("Else, install the Python libs it installs.\n")
-    raise
-
 # Path to the directory that contains this file is assumed to be the cache dir
 cache_dir = os.path.dirname(os.path.abspath(__file__))
 
@@ -19,7 +11,7 @@ cache_dir = os.path.dirname(os.path.abspath(__file__))
 def cache_build(build):
     """Cache the artifacts required for the given debian build.
 
-    :param build: Description of an ODL build, typically from build_vars.yaml
+    :param build: Description of an ODL build
     :type build: dict
 
     """
@@ -38,12 +30,3 @@ def cache_build(build):
         print("Already cached: {}".format(odl_tarball))
 
     return odl_tarball_path
-
-
-# If run as a script, cache artifacts required for all builds
-if __name__ == "__main__":
-    # Load debian build variables from a YAML config file
-    with open(os.path.join(cache_dir, os.pardir, "build_vars.yaml")) as var_fd:
-        build_vars = yaml.load(var_fd)
-    for build in build_vars["builds"]:
-        odl_tarball_path = cache_build(build)
index 2667b31bf87c08c1cc449be001e366316db7c424..788b469d589299a0cdd9a131eb4e9d8770accdef 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-"""Build debian files from YAML debian config and Jinja2 debian templates."""
+"""Build debian files from build descriptionand Jinja2 debian templates."""
 
 import os
 import re
@@ -9,7 +9,6 @@ import sys
 import urllib
 
 try:
-    import yaml
     from jinja2 import Environment, FileSystemLoader
 except ImportError:
     sys.stderr.write("We recommend using our included Vagrant env.\n")
@@ -45,7 +44,7 @@ def build_debfiles(build):
     specializes templates with build-spicific vars to create dynamic files,
     downloads build-specific systemd unitfile based on commit hash.
 
-    :param build: Description of a debian build, typically from build_vars.yaml
+    :param build: Description of a debian build
     :type build: dict
 
     """
@@ -102,13 +101,3 @@ def build_debfiles(build):
     # Download ODL's systemd unitfile
     if not os.path.isfile(unitfile_path):
         urllib.urlretrieve(unitfile_url, unitfile_path)
-
-
-# If run as a script, build debian files for all builds
-if __name__ == "__main__":
-    # Load debian build variables from a YAML config file
-    with open(os.path.join(templates_dir, os.pardir, "build_vars.yaml")) as var_fd:
-        build_vars = yaml.load(var_fd)
-
-    for build in build_vars["builds"]:
-        build_debfiles(build)
index 7a85332a3e51a87e25b599610ce33693ff76c8c6..e5dc656835e383df0555746c60677f01abee54cd 100644 (file)
@@ -1,4 +1,3 @@
-pyyaml
 jinja2
 bs4
 requests