コード例 #1
0
ファイル: TimerTaskTest.php プロジェクト: primat/deployer-org
 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);