Skip to content
Snippets Groups Projects
Commit d2a687e9 authored by hahn's avatar hahn
Browse files

ci server - config - detect prod system by directory

parent 407ddf56
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
// fetch status infos von den einzelnen Phasen
// ----------------------------------------------------------------------
$aConfig = array(
$aConfig = array(
// Basispfad:
'workDir' => '/var/imldeployment',
'tmpDir' => '/var/tmp/imldeployment',
......@@ -101,6 +101,10 @@
// override for local development
// ----------------------------------------------------------------------
// unsafe ...
// make a check that fits your environemnt
// php_uname("n") can send a short hostname (without domain)
$bProd=!!strpos(__DIR__, '/ci.iml.unibe.ch/');
switch (php_uname("n")) {
case "USER":
......@@ -112,19 +116,21 @@ switch (php_uname("n")) {
case "ci.iml.unibe.ch":
case "ci":
// synch der Pakete nur auf dem Livesystem
$aConfig['mirrorPackages'] = array(
'puppet' => array(
'type' => 'rsync',
'runas' => 'www-data', // nur fuer commandline
'target' => 'ladmin@calcium.iml.unibe.ch:/share/imldeployment',
),
'puppet.one' => array(
'type' => 'rsync',
'runas' => 'www-data', // nur fuer commandline
'target' => 'copy-deployment@puppet.one.iml.unibe.ch:/var/shared/imldeployment',
),
);
if ($bProd){
// synch der Pakete nur auf dem Livesystem
$aConfig['mirrorPackages'] = array(
'puppet' => array(
'type' => 'rsync',
'runas' => 'www-data', // nur fuer commandline
'target' => 'ladmin@calcium.iml.unibe.ch:/share/imldeployment',
),
'puppet.one' => array(
'type' => 'rsync',
'runas' => 'www-data', // nur fuer commandline
'target' => 'copy-deployment@puppet.one.iml.unibe.ch:/var/shared/imldeployment',
),
);
}
break;
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment