Skip to content
Snippets Groups Projects

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

Merged Hahn Axel (hahn) requested to merge rollout-plugins-with-multiple-config-sets into master
1 file
+ 12
3
Compare changes
  • Side-by-side
  • Inline
@@ -17,6 +17,13 @@ class rollout_base implements iRolloutplugin
// ---------------------------------------------------------------
// VARIABLES
// ---------------------------------------------------------------
/**
* Plugin name
* @var string
*/
protected string $_sPluginName = 'UNSET';
/**
* identifier for current plugin; it us used to find the current plugin
* settings in the config structore for global and project based config
@@ -82,6 +89,7 @@ class rollout_base implements iRolloutplugin
* Constructor
* initialize rollout plugin
* @param array $aParams hash with those possible keys
* id string rollout plugin id in project config
* lang string language, i.e. 'de'
* phase string name of phase in a project
* globalcfg array given global config $aConfig
@@ -94,7 +102,8 @@ class rollout_base implements iRolloutplugin
// set current plugin id - taken from plugin directory name above
$oReflection = new ReflectionClass($this);
$this->_sPluginId = basename(dirname($oReflection->getFileName()));
$this->_sPluginName = basename(dirname($oReflection->getFileName()));
$this->_sPluginId = $aParams['id'] ?? 'UNSET';
// ----- init language
if (isset($aParams['lang'])) {
@@ -244,7 +253,7 @@ class rollout_base implements iRolloutplugin
(isset($aVarinfos['ttl']) ? $aVarinfos['ttl'] : 60)
);
if (!$aCallbackData) {
$aVarinfos['type'] = 'text';
$aVarinfos['type'] = $aVarinfos['type'] ?? 'text';
} else {
$aEffectiveConfig = $this->getConfig($sPhase);
// echo $sKey.' ... '; print_r($aEffectiveConfig[$sVarname]); echo '<br>';
@@ -524,7 +533,7 @@ class rollout_base implements iRolloutplugin
public function getDeployCommands(string $sPhase, bool $bMask = false): array
{
return [
'echo "ERROR: The method getDeployCommamds($sPhase) was not implemented in the rollout plugin [' . $this->getId() . ']"',
'echo "ERROR: The method getDeployCommamds($sPhase) was not implemented in the rollout plugin [' . $this->_sPluginName . ']"',
'exit 1'
];
}
Loading