Skip to content
Snippets Groups Projects

5534 add docker

Merged Hahn Axel (hahn) requested to merge 5534-add-docker into master
5 files
+ 91
5
Compare changes
  • Side-by-side
  • Inline

Files

@@ -7,6 +7,9 @@ require_once __DIR__.'/../inc_functions.php';
require_once 'base.class.php';
require_once 'htmlguielements.class.php';
require_once 'messenger.class.php';
// plugins
require_once 'build_base.class.php';
require_once 'rollout_base.class.php';
/* ######################################################################
@@ -1897,11 +1900,42 @@ class project extends base {
}
$this->_TempFill($sReturn, $aActionList);
// create tgz archive
$sReturn.=sprintf(t("creating-file"), $sPackageFileArchiv) . "<br>";
$sReturn.=$this->_execAndSend("cd $sTempBuildDir && tar -czf $sPackageFileArchiv .");
$this->_TempFill($sReturn, $aActionList);
// ----- loop over enabled build plugins
// WIP
// set name of the activated plugin for this project
$aPlugins=(isset($this->_aPrjConfig['build']['enabled_build_plugins']) && $this->_aPrjConfig['build']['enabled_build_plugins'])
? $this->_aPrjConfig['build']['enabled_build_plugins']
: ['tgz']
;
foreach($aPlugins as $sPluginName){
$oPlugin = false;
$sReturn.='<h4>'.$sPluginName.'</h4>';
try{
include_once $this->_getPluginFilename('build', $sPluginName);
$sPluginClassname='build_'.$sPluginName;
$oPlugin = new $sPluginClassname(array(
'lang'=>$this->_aConfig['lang'],
'workdir'=>$sTempBuildDir,
'outfile'=>$sPackageFileArchiv,
));
} catch (Exception $ex) {
return $this->_oHtml->getBox("error",
"FAILED to initialize build plugin " .$sPluginName .'<br>'
. $sReturn
);
}
$sReturn.=sprintf(t("creating-file"), $oPlugin->getOutfile()) . "<br>";
foreach($oPlugin->checkRequirements() as $sCommand){
$sReturn.=$this->_execAndSend($sCommand);
$this->_TempFill($sReturn, $aActionList);
}
foreach($oPlugin->getBuildCommands() as $sCommand){
$sReturn.=$this->_execAndSend($sCommand);
$this->_TempFill($sReturn, $aActionList);
}
}
// write info file (.json)
$sReturn.=sprintf(t("creating-file"), $sInfoFileArchiv) . "<br>";
Loading