Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Imldeployment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
Imldeployment
Commits
fcdae77b
Commit
fcdae77b
authored
7 months ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
rollout plugins: handle name and id
parent
a23aa337
No related branches found
No related tags found
1 merge request
!72
OP#7651 CI Server: beide AWX ansteuerbar machen https://projects.iml.unibe.ch/work_packages/7651
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
public_html/deployment/classes/rollout_base.class.php
+12
-3
12 additions, 3 deletions
public_html/deployment/classes/rollout_base.class.php
with
12 additions
and
3 deletions
public_html/deployment/classes/rollout_base.class.php
+
12
−
3
View file @
fcdae77b
...
...
@@ -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'
];
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment