Skip to content
Snippets Groups Projects
Select Git revision
  • a7d4def9f418ccebb228ff98ea0f0a185d3cb1fd
  • master default protected
  • simple-task/7248-eol-check-add-node-22
  • 6877_check_iml_deployment
4 results

check_requirements

Blame
  • act_build.php 9.63 KiB
    <?php
    
    /* ######################################################################
    
      IML DEPLOYMENT
    
      webgui - build a package
    
      ---------------------------------------------------------------------
      2014-11-14  Axel <axel.hahn@iml.unibe.ch>  selector for branches
      2014-02-14  Axel <axel.hahn@iml.unibe.ch>  build was "ajaxified"
      2013-11-08  Axel <axel.hahn@iml.unibe.ch>
      ###################################################################### */
    
    require_once("./classes/project_gui.class.php");
    require_once("./classes/formgen.class.php");
    set_time_limit(0);
    
    // --- Checks
    $oPrj = new projectgui($aParams["prj"]);
    
    $sOut = '';
    
    // switch to a branch if it was selected
    $sBranchname = '';
    if (array_key_exists("branchname", $aParams)) {
        $sBranchname = $aParams["branchname"];
        $oPrj->setBranchname($aParams["branchname"]);
    } else {
        $sBranchname = $oPrj->getBranchname(true);
    }
    
    if (!array_key_exists("confirm", $aParams)) {
        // ------------------------------------------------------------
        // let the user click a button to make a new build
        // ------------------------------------------------------------
        $sNext = $oPrj->getNextPhase();
        $aPhaseData2 = $oPrj->getPhaseInfos($sNext);
        $sBranchontarget=isset($aPhaseData2["ready2install"]["branch"]) ? $aPhaseData2["ready2install"]["branch"]: '';
        print_r($sBranchname);
        $bIgnoreCache = isset($aParams['reloadBranches']) ? $aParams['reloadBranches'] : false;
    
        // $sOut.='<p>Re-Read Branches (ignore caching) - '.($bIgnoreCache ? "JA" : "mein" ).'</p>';
    
        $sOut.='<p>' . sprintf(t("page-build-info"), $sNext, $sNext) . '</p>';
    
        $sRevison = false;
        $aRepodata = $oPrj->getRepoRevision(true);
        if (isset($aRepodata["revision"])) {
            $sRevison = $aRepodata["revision"];
            if (
                    array_key_exists("revision", $aPhaseData2["onhold"]) && $aPhaseData2["onhold"]["revision"] == $sRevison
            ) {
                $sOut.=$oHtml->getBox("warning", "In der Queue von [$sNext] ist die Version bereits $sRevison vorhanden!");
            }
            if (
                    array_key_exists("revision", $aPhaseData2["ready2install"]) && $aPhaseData2["ready2install"]["revision"] == $sRevison
            ) {
                $sOut.=$oHtml->getBox("warning", "Im Repo von [$sNext] ist die Version $sRevison bereits vorhanden!");
            }
        }
        $sOut.='
            <table>
                 <thead>
                     <tr>
                         <th class="versioncontrol" colspan="3">' . $oHtml->getIcon('repository').t("versioncontrol") . '<br></th>
                         <th> </th>
                         <th class="' . $sNext . '" colspan="2">' . $oHtml->getIcon('phase').$sNext . '</th>
                     </tr>
                 </thead>