Skip to content

Commit

Permalink
Merge pull request #30 from ByteInternet/rename-ephemeral-to-brancher
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderGrooff authored Oct 21, 2022
2 parents c649213 + 2feabfd commit c1d105a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ Usage:
``` php
$configuration->addAfterDeployTask(new \Hypernode\DeployConfiguration\AfterDeployTask\SlackWebhook());
```
### 5. Ephemeral servers for acceptance/integration testing
### 5. Brancher servers for acceptance/integration testing

Usage:
``` php
$stage = $configuration->addStage('test', 'test.domain.com');
$stage->addEphemeralServer('appname');
$stage->addBrancherServer('appname');
```

## Application template
Expand Down
2 changes: 1 addition & 1 deletion src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
class Server
{
public const OPTION_HN_EPHEMERAL = 'hn_ephemeral';
public const OPTION_HN_BRANCHER = 'hn_brancher';
public const OPTION_HN_PARENT_APP = 'hn_parent_app';

/**
Expand Down
12 changes: 6 additions & 6 deletions src/Stage.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,22 @@ public function addServer(
}

/**
* Create a temporary (ephemeral) Hypernode instance based on given Hypernode.
* Create a temporary (brancher) Hypernode instance based on given Hypernode.
* The hostname will be defined during the deployment.
*
* @param string $appName Name of the Hypernode to base the ephemeral server on
* @param string $appName Name of the Hypernode to base the brancher server on
* @param array|null $roles Roles for the server to be applied
* @param array $options Extra host options for Deployer
* @see ServerRole
* @return Server
*/
public function addEphemeralServer(string $appName, array $roles = null, array $options = []): Server
public function addBrancherServer(string $appName, array $roles = null, array $options = []): Server
{
$ephemeralOptions = [
Server::OPTION_HN_EPHEMERAL => true,
$brancherOptions = [
Server::OPTION_HN_BRANCHER => true,
Server::OPTION_HN_PARENT_APP => $appName,
];
$options = array_merge($ephemeralOptions, $options);
$options = array_merge($brancherOptions, $options);
$server = new Server('', $roles, $options);
$this->servers[] = $server;
return $server;
Expand Down
2 changes: 1 addition & 1 deletion templates/deploy.magento2.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
$productionStage->addServer('appname.hypernode.io');

$testStage = $configuration->addStage('test', 'example.com');
$testStage->addEphemeralServer('appname');
$testStage->addBrancherServer('appname');

return $configuration;
2 changes: 1 addition & 1 deletion templates/deploy.shopware6.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
$productionStage->addServer('appname.hypernode.io');

$testStage = $configuration->addStage('test', 'example.com');
$testStage->addEphemeralServer('appname');
$testStage->addBrancherServer('appname');

return $configuration;

0 comments on commit c1d105a

Please sign in to comment.