Add support for new way of specifying artifact dir in cct
@@ -2,7 +2,6 @@ import logging
import os
import yaml
import shutil
-import subprocess
from dogen.plugin import Plugin
@@ -49,6 +48,10 @@ class CCT(Plugin):
if not os.path.exists(target_modules_dir):
os.makedirs(target_modules_dir)
+ target_artifacts_dir = os.path.join(cfg_file_dir, 'artifacts')
+ if not os.path.exists(target_artifacts_dir):
+ os.makedirs(target_artifacts_dir)
+
cfg_file = os.path.join(cfg_file_dir, "cct.yaml")
with open(cfg_file, 'w') as f:
yaml.dump(cfg['cct']['configure'], f)
@@ -70,7 +73,7 @@ class CCT(Plugin):
cct_logger.setLevel(self.log.getEffectiveLevel())
cct = CCT_CLI()
- cct.process_changes([cfg_file], target_modules_dir, True)
+ cct.process_changes([cfg_file], target_modules_dir, target_artifacts_dir, True)
self.log.info("CCT plugin downloaded artifacts")
