Skip to content
Snippets Groups Projects

OP#7651 CI Server: beide AWX ansteuerbar machen https://projects.iml.unibe.ch/work_packages/7651 - Part 2

Merged Hahn Axel (hahn) requested to merge rollout-plugins-with-multiple-config-sets into master
4 files
+ 127
58
Compare changes
  • Side-by-side
  • Inline

Files

@@ -28,7 +28,7 @@ require_once 'htmlguielements.class.php';
(...)
2024-08-28 Axel php8 only; added variable types; short array syntax
2024-09-20 Axel build(): check if checkout of sources failed
2024-11-29 Axel multiple instances for rollout plugins
2024-12-05 Axel multiple instances for rollout plugins; handle errors from callback
###################################################################### */
/**
@@ -1583,22 +1583,25 @@ class project extends base
$sPluginId = (isset($this->_aPrjConfig['deploy']['enabled_rollout_plugin']) && $this->_aPrjConfig['deploy']['enabled_rollout_plugin'])
? $this->_aPrjConfig['deploy']['enabled_rollout_plugin']
: 'default';
$sPluginName=$this->_aConfig['plugins']['rollout'][$sPluginId]['plugin'];
$sPluginName=$this->_aConfig['plugins']['rollout'][$sPluginId]['plugin'] ?? false;
unset($this->oRolloutPlugin);
try {
require_once $this->_getPluginFilename('rollout', $sPluginName);
$sPluginClassname = 'rollout_' . $sPluginName;
$this->oRolloutPlugin = new $sPluginClassname([
'id' => $sPluginId,
'lang' => $this->_aConfig['lang'],
'phase' => false,
'globalcfg' => isset($this->_aConfig['plugins']['rollout'][$sPluginId]) ? $this->_aConfig['plugins']['rollout'][$sPluginId] : [],
'projectcfg' => $this->_aPrjConfig,
]);
// print_r($this->_oRolloutPlugin->getPluginfos());
// print_r($this->_oRolloutPlugin->getName());
} catch (Exception $ex) {
}
if ($sPluginName){
try {
require_once $this->_getPluginFilename('rollout', $sPluginName);
$sPluginClassname = 'rollout_' . $sPluginName;
$this->oRolloutPlugin = new $sPluginClassname([
'id' => $sPluginId,
'lang' => $this->_aConfig['lang'],
'phase' => false,
'globalcfg' => isset($this->_aConfig['plugins']['rollout'][$sPluginId]) ? $this->_aConfig['plugins']['rollout'][$sPluginId] : [],
'projectcfg' => $this->_aPrjConfig,
]);
// print_r($this->_oRolloutPlugin->getPluginfos());
// print_r($this->_oRolloutPlugin->getName());
} catch (Exception $ex) {
}
}
return true;
}
Loading