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
Merge requests
!9
Rollout plugins - converter
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Rollout plugins - converter
rollout-plugins
into
master
Overview
0
Commits
9
Pipelines
0
Changes
1
Merged
Hahn Axel (hahn)
requested to merge
rollout-plugins
into
master
3 years ago
Overview
0
Commits
9
Pipelines
0
Changes
1
Fixes and updates
converter for project configs to usage of rollout plugins
0
0
Merge request reports
Viewing commit
0adb4dd0
Prev
Next
Show latest version
1 file
+
60
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
0adb4dd0
WIP: converter for project configs
· 0adb4dd0
hahn
authored
3 years ago
shellscripts/convert_projects_2_rollout-plugins.php
0 → 100644
+
60
−
0
View file @ 0adb4dd0
Edit in single-file editor
Open in Web IDE
<?php
/**
*
* CRONJOB
* deploy all queued packages
*
*/
// http://iml:deployment@ci.iml.unibe.ch/deployment/?prj=ci&action=deploy&par3=preview&confirm=1
$sDocroot
=
(
dirname
(
__dir__
))
.
"/public_html"
;
$processUser
=
posix_getpwuid
(
posix_geteuid
());
if
(
$processUser
[
'name'
]
==
"root"
){
die
(
"Do not start the script as user root
\n
"
);
};
require_once
(
"
$sDocroot
/deployment/classes/logger.class.php"
);
global
$oCLog
;
$oCLog
=
new
logger
();
require_once
(
"
$sDocroot
/../config/inc_projects_config.php"
);
require_once
(
"
$sDocroot
/deployment/inc_functions.php"
);
require_once
(
"
$sDocroot
/deployment/classes/project.class.php"
);
echo
"
\n
"
;
echo
"===== IMLDEPLOYMENT - converter for rollout plugins
\n
"
;
echo
"
\n
"
;
$oPrj1
=
new
project
();
foreach
(
$oPrj1
->
getProjects
()
as
$sPrj
)
{
$oPrj
=
new
project
(
$sPrj
);
echo
"-----
$sPrj
:
\n
"
;
$aCfg
=
$oPrj
->
getConfig
();
// NEXT STEPS:
// test if a pluin was set already...
if
(
isset
(
$aCfg
[
'deploy'
][
'enabled_rollout_plugin'
])){
echo
"SKIP: Project uses rollout plugin ["
.
$aCfg
[
'deploy'
][
'enabled_rollout_plugin'
]
.
"]
\n
"
;
}
else
{
echo
"TODO: Project needs to be converted...
\n
"
;
print_r
(
$aCfg
[
'phases'
][
'preview'
][
'hosts'
]);
/*
// convert
// ... and save
if ($oPrj->saveConfig($aConfig)) {
echo "OK, config was saved \n";
} else {
echo "ERROR: config was NOT saved :-/ \n";
die("Aborting");
}
*
*/
}
echo
"
\n
"
;
}
echo
"done
\n
"
;
Loading