예제 #1
0
 public function testPushAndPop()
 {
     $time = TimerTask::getStartTime();
     //$stack = array();
     $this->assertEquals(0, $time);
     //		array_push($stack, 'foo');
     //		$this->assertEquals('foo', $stack[count($stack)-1]);
     //		$this->assertEquals(1, count($stack));
     //
     //		$this->assertEquals('foo', array_pop($stack));
     //		$this->assertEquals(0, count($stack));
 }
예제 #2
0
//
Task::log("- Syncing revision {$workingCopy->info->commitRevision} with {$syncDestinationDir1->getPath()} on {$syncDestinationDir1->getHost()->hostname}\n\n");
//
FileSyncTask::sync($rsyncOptions1);
// ********************
// *** Deploy
//
TimerTask::start();
// Import DB
MysqlTask::importDump($destinationDb, $tmpDumpFile->getPath(), $destinationDbSchema);
//
Task::log("- Syncing intermediate directory {$syncDestinationDir1->path} with {$syncDestinationDir2->path}\n\n");
//
$rsyncCommand = FileSyncTask::getRsyncCommand($rsyncOptions2);
SshTask::exec($syncDestinationDir1->getHost(), $rsyncCommand);
// Stop the deploy timer and log it
TimerTask::stop();
Task::log("Deploy time: " . TimerTask::getLastElapsedTime() . "\n\n");
exit;
// ********************
// *** Tag
//
if ($build === 'prod') {
    SvnTask::commit($workingCopy, "Release to Production");
}
// ********************
// *** Notify
//
$cogecoCaReleaseEmail->bodyHtml = ViewTask::load('views/template-release-html.php', array('changes' => ''), TRUE);
$cogecoCaReleaseEmail->bodyText = ViewTask::load('views/template-release-text.php', array('changes' => ''), TRUE);
EmailTask::sendEmail($emailConnector, $cogecoCaReleaseEmail);