From cae5c20bb083239442a987cf7afd66acdafd9b4a Mon Sep 17 00:00:00 2001 From: Marek Goldmann Date: Mon, 3 Jul 2017 15:08:52 +0200 Subject: [PATCH 1/4] Switch to next development version --- dogen/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dogen/version.py b/dogen/version.py index 293db5f..b395dd1 100644 --- a/dogen/version.py +++ b/dogen/version.py @@ -1 +1 @@ -version = "2.2.0" +version = "2.3.0rc1.dev" From 238de1ecc9144f345f7bb0cb01c11f395ea94448 Mon Sep 17 00:00:00 2001 From: Marek Goldmann Date: Tue, 4 Jul 2017 08:08:20 +0200 Subject: [PATCH 2/4] Remove additional curly bracket from template Fixes #168 --- dogen/templates/template.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dogen/templates/template.jinja b/dogen/templates/template.jinja index fdda024..c04dbdc 100644 --- a/dogen/templates/template.jinja +++ b/dogen/templates/template.jinja @@ -103,7 +103,7 @@ RUN [ "bash", "-x", "/tmp/scripts/{{ script.package }}/{{ script.exec }}" ] {% if cct %} USER {{ dogen.plugins.cct.user }} -RUN python /opt/cct.zip {%if dogen.plugins.cct.verbose %}-v{% endif %} --modules-dir /tmp/cct/modules/ --artifacts-dir /tmp/artifacts/} /tmp/cct/cct.yaml && rm /opt/cct.zip && rm -rf /tmp/cct +RUN python /opt/cct.zip {%if dogen.plugins.cct.verbose %}-v{% endif %} --modules-dir /tmp/cct/modules/ --artifacts-dir /tmp/artifacts/ /tmp/cct/cct.yaml && rm /opt/cct.zip && rm -rf /tmp/cct {% endif %} From 9cb2f2b2306f226217ed8c2c998a78aebf5e395b Mon Sep 17 00:00:00 2001 From: David Becvarik Date: Tue, 4 Jul 2017 16:24:57 +0200 Subject: [PATCH 3/4] updated CCT plugin to fetch modules to cct dir next to image.yaml CCT plugin now fetches all modules to 'cct' directory next to the image descriptor. If module already exists its skipped and local copy is preserved. --- dogen/plugins/cct.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/dogen/plugins/cct.py b/dogen/plugins/cct.py index 85e62ef..1c921f7 100644 --- a/dogen/plugins/cct.py +++ b/dogen/plugins/cct.py @@ -91,18 +91,28 @@ def prepare(self, cfg): os.makedirs(target_modules_dir) + cfg_file = os.path.join(cct_dir, "cct.yaml") + with open(cfg_file, 'w') as f: + yaml.dump(cfg['cct'], f) + local_modules_dir = os.path.join(os.path.dirname(self.descriptor), 'cct') - self.log.debug('Found existing modules in directory: %s' % local_modules_dir) + + # setup cct to same logging level as dogen + cct_logger = logging.getLogger("cct") + cct_logger.setLevel(self.log.getEffectiveLevel()) + + cct_cfg.dogen = True + cct = CCT_CLI() + cct.process_changes([cfg_file], local_modules_dir, self.output) + cfg['sources'] += cct_cfg.artifacts + self.log.info("CCT plugin reported artifacts to dogen") + if os.path.exists(local_modules_dir): for module in os.listdir(local_modules_dir): module_path = os.path.join(local_modules_dir, module) self.log.info("Using cached module '%s' from path '%s'" % (module, module_path)) shutil.copytree(module_path, os.path.join(target_modules_dir, module)) - cfg_file = os.path.join(cct_dir, "cct.yaml") - with open(cfg_file, 'w') as f: - yaml.dump(cfg['cct'], f) - # copy cct modules from modules_dir = os.path.join(os.path.dirname(self.descriptor), 'cct', 'modules') if os.path.exists(modules_dir): @@ -112,16 +122,6 @@ def prepare(self, cfg): shutil.copytree(os.path.join(modules_dir, module), target_module) self.log.info("Copied module %s to %s" % (module, target_module)) - # setup cct to same logging level as dogen - cct_logger = logging.getLogger("cct") - cct_logger.setLevel(self.log.getEffectiveLevel()) - - cct_cfg.dogen = True - cct = CCT_CLI() - cct.process_changes([cfg_file], target_modules_dir, self.output) - cfg['sources'] += cct_cfg.artifacts - self.log.info("CCT plugin reported artifacts to dogen") - if 'cct_runtime' in cfg: cfg['entrypoint'] = ['/usr/bin/cct'] self.runtime_changes(cfg) From d44f36a725990b76c880e40235e9c2e6c805c469 Mon Sep 17 00:00:00 2001 From: Marek Goldmann Date: Thu, 13 Jul 2017 15:16:03 +0200 Subject: [PATCH 4/4] Release 2.3.0 --- dogen/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dogen/version.py b/dogen/version.py index b395dd1..9971c5f 100644 --- a/dogen/version.py +++ b/dogen/version.py @@ -1 +1 @@ -version = "2.3.0rc1.dev" +version = "2.3.0"