+++ /dev/null
-# 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"
#!/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__))
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
"""
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)
#!/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
import urllib
try:
- import yaml
from jinja2 import Environment, FileSystemLoader
except ImportError:
sys.stderr.write("We recommend using our included Vagrant env.\n")
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
"""
# 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)