deploy() public method

Adds the .dodeploy flag file in the deploy folder, therefore the app will be deployed with the next restart.
public deploy ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, AppserverIo\Configuration\Interfaces\NodeInterface $appNode ) : void
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container the app is bound to
$appNode AppserverIo\Configuration\Interfaces\NodeInterface The application node object
return void
Example #1
0
 /**
  * Tests if we will run through the deploy process without an error
  *
  * @return null
  */
 public function testDeploy()
 {
     $mockExtractor = $this->getMock('\\AppserverIo\\Appserver\\Core\\Interfaces\\ExtractorInterface');
     $mockExtractor->expects($this->once())->method('flagArchive');
     $this->appService->injectExtractor($mockExtractor);
     $this->appService->deploy($appNode = new AppNode(__METHOD__, '/opt/appserver/targetwebapp'));
 }
 /**
  * Tests if we will run through the deploy process without an error
  *
  * @return null
  */
 public function testDeploy()
 {
     $mockHost = $this->getMockBuilder('\\AppserverIo\\Appserver\\Core\\Api\\Node\\HostNodeInterface')->setMethods(get_class_methods('\\AppserverIo\\Appserver\\Core\\Api\\Node\\HostNodeInterface'))->getMock();
     $mockHost->expects($this->once())->method('getDeployBase')->willReturn('webapps');
     $mockContainer = $this->getMockBuilder('\\AppserverIo\\Appserver\\Core\\Api\\Node\\ContainerNodeInterface')->setMethods(get_class_methods('\\AppserverIo\\Appserver\\Core\\Api\\Node\\ContainerNodeInterface'))->getMock();
     $mockContainer->expects($this->once())->method('getHost')->willReturn($mockHost);
     $mockExtractor = $this->getMock('\\AppserverIo\\Appserver\\Core\\Interfaces\\ExtractorInterface');
     $mockExtractor->expects($this->once())->method('flagArchive');
     $this->appService->injectExtractor($mockExtractor);
     $this->appService->deploy($mockContainer, new AppNode(__METHOD__, '/opt/appserver/targetwebapp'));
 }