Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions src/Deployer/Task/After/RumvisionTask.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?php

namespace Hypernode\Deploy\Deployer\Task\After;

use Deployer\Task\Task;
use Hypernode\DeployConfiguration\RecipeLoader;
use Hypernode\Deploy\Deployer\Task\ConfigurableTaskInterface;
use Hypernode\Deploy\Deployer\Task\TaskBase;
use Hypernode\DeployConfiguration\AfterDeployTask\Rumvision;
use Hypernode\DeployConfiguration\TaskConfigurationInterface;

use function Hypernode\Deploy\Deployer\after;
use function Deployer\set;

class RumvisionTask extends TaskBase implements ConfigurableTaskInterface
{
/**
* @var RecipeLoader
*/
private $recipeLoader;

public function __construct(RecipeLoader $recipeLoader)
{
$this->recipeLoader = $recipeLoader;
}

public function supports(TaskConfigurationInterface $config): bool
{
return $config instanceof Rumvision;

Check failure on line 29 in src/Deployer/Task/After/RumvisionTask.php

View workflow job for this annotation

GitHub Actions / code_quality (8.4)

UndefinedClass

src/Deployer/Task/After/RumvisionTask.php:29:35: UndefinedClass: Class, interface or enum named Hypernode\DeployConfiguration\AfterDeployTask\Rumvision does not exist (see https://psalm.dev/019)

Check failure on line 29 in src/Deployer/Task/After/RumvisionTask.php

View workflow job for this annotation

GitHub Actions / code_quality (8.1)

UndefinedClass

src/Deployer/Task/After/RumvisionTask.php:29:35: UndefinedClass: Class, interface or enum named Hypernode\DeployConfiguration\AfterDeployTask\Rumvision does not exist (see https://psalm.dev/019)
}

/**
* @param TaskConfigurationInterface|Rumvision $config

Check failure on line 33 in src/Deployer/Task/After/RumvisionTask.php

View workflow job for this annotation

GitHub Actions / code_quality (8.4)

MismatchingDocblockParamType

src/Deployer/Task/After/RumvisionTask.php:33:15: MismatchingDocblockParamType: Parameter $config has wrong type 'Hypernode\DeployConfiguration\AfterDeployTask\Rumvision|Hypernode\DeployConfiguration\TaskConfigurationInterface', should be 'Hypernode\DeployConfiguration\TaskConfigurationInterface' (see https://psalm.dev/141)

Check failure on line 33 in src/Deployer/Task/After/RumvisionTask.php

View workflow job for this annotation

GitHub Actions / code_quality (8.4)

UndefinedDocblockClass

src/Deployer/Task/After/RumvisionTask.php:33:15: UndefinedDocblockClass: Docblock-defined class, interface or enum named Hypernode\DeployConfiguration\AfterDeployTask\Rumvision does not exist (see https://psalm.dev/200)

Check failure on line 33 in src/Deployer/Task/After/RumvisionTask.php

View workflow job for this annotation

GitHub Actions / code_quality (8.1)

MismatchingDocblockParamType

src/Deployer/Task/After/RumvisionTask.php:33:15: MismatchingDocblockParamType: Parameter $config has wrong type 'Hypernode\DeployConfiguration\AfterDeployTask\Rumvision|Hypernode\DeployConfiguration\TaskConfigurationInterface', should be 'Hypernode\DeployConfiguration\TaskConfigurationInterface' (see https://psalm.dev/141)

Check failure on line 33 in src/Deployer/Task/After/RumvisionTask.php

View workflow job for this annotation

GitHub Actions / code_quality (8.1)

UndefinedDocblockClass

src/Deployer/Task/After/RumvisionTask.php:33:15: UndefinedDocblockClass: Docblock-defined class, interface or enum named Hypernode\DeployConfiguration\AfterDeployTask\Rumvision does not exist (see https://psalm.dev/200)
*/
public function configureWithTaskConfig(TaskConfigurationInterface $config): ?Task
{
$this->recipeLoader->loadRecipe('rumvision.php');

set('rumvision', [
'api_key' => $config->getApiKey(),
'domains' => $config->getDomains(),
'title' => $config->getTitle(),
'name_prefix' => $config->getNamePrefix(),
'description' => $config->getDescription(),
'url_scope' => $config->getUrlScope(),
'url_category_ids' => $config->getUrlCategoryIds(),
'impact_at' => $config->getImpactAt(),
'category_slug' => $config->getCategorySlug(),
]);

return null;
}

public function register(): void
{
after('deploy', 'deploy:rumvision');
}
}
57 changes: 57 additions & 0 deletions src/Deployer/Task/After/TidewaysTask.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

namespace Hypernode\Deploy\Deployer\Task\After;

use Deployer\Task\Task;
use Hypernode\DeployConfiguration\RecipeLoader;
use Hypernode\Deploy\Deployer\Task\ConfigurableTaskInterface;
use Hypernode\Deploy\Deployer\Task\TaskBase;
use Hypernode\DeployConfiguration\AfterDeployTask\Tideways;
use Hypernode\DeployConfiguration\TaskConfigurationInterface;

use function Hypernode\Deploy\Deployer\after;
use function Deployer\set;

class TidewaysTask extends TaskBase implements ConfigurableTaskInterface
{
/**
* @var RecipeLoader
*/
private $recipeLoader;

public function __construct(RecipeLoader $recipeLoader)
{
$this->recipeLoader = $recipeLoader;
}

public function supports(TaskConfigurationInterface $config): bool
{
return $config instanceof Tideways;

Check failure on line 29 in src/Deployer/Task/After/TidewaysTask.php

View workflow job for this annotation

GitHub Actions / code_quality (8.4)

UndefinedClass

src/Deployer/Task/After/TidewaysTask.php:29:35: UndefinedClass: Class, interface or enum named Hypernode\DeployConfiguration\AfterDeployTask\Tideways does not exist (see https://psalm.dev/019)

Check failure on line 29 in src/Deployer/Task/After/TidewaysTask.php

View workflow job for this annotation

GitHub Actions / code_quality (8.1)

UndefinedClass

src/Deployer/Task/After/TidewaysTask.php:29:35: UndefinedClass: Class, interface or enum named Hypernode\DeployConfiguration\AfterDeployTask\Tideways does not exist (see https://psalm.dev/019)
}

/**
* @param TaskConfigurationInterface|Tideways $config

Check failure on line 33 in src/Deployer/Task/After/TidewaysTask.php

View workflow job for this annotation

GitHub Actions / code_quality (8.4)

MismatchingDocblockParamType

src/Deployer/Task/After/TidewaysTask.php:33:15: MismatchingDocblockParamType: Parameter $config has wrong type 'Hypernode\DeployConfiguration\AfterDeployTask\Tideways|Hypernode\DeployConfiguration\TaskConfigurationInterface', should be 'Hypernode\DeployConfiguration\TaskConfigurationInterface' (see https://psalm.dev/141)

Check failure on line 33 in src/Deployer/Task/After/TidewaysTask.php

View workflow job for this annotation

GitHub Actions / code_quality (8.4)

UndefinedDocblockClass

src/Deployer/Task/After/TidewaysTask.php:33:15: UndefinedDocblockClass: Docblock-defined class, interface or enum named Hypernode\DeployConfiguration\AfterDeployTask\Tideways does not exist (see https://psalm.dev/200)

Check failure on line 33 in src/Deployer/Task/After/TidewaysTask.php

View workflow job for this annotation

GitHub Actions / code_quality (8.1)

MismatchingDocblockParamType

src/Deployer/Task/After/TidewaysTask.php:33:15: MismatchingDocblockParamType: Parameter $config has wrong type 'Hypernode\DeployConfiguration\AfterDeployTask\Tideways|Hypernode\DeployConfiguration\TaskConfigurationInterface', should be 'Hypernode\DeployConfiguration\TaskConfigurationInterface' (see https://psalm.dev/141)

Check failure on line 33 in src/Deployer/Task/After/TidewaysTask.php

View workflow job for this annotation

GitHub Actions / code_quality (8.1)

UndefinedDocblockClass

src/Deployer/Task/After/TidewaysTask.php:33:15: UndefinedDocblockClass: Docblock-defined class, interface or enum named Hypernode\DeployConfiguration\AfterDeployTask\Tideways does not exist (see https://psalm.dev/200)
*/
public function configureWithTaskConfig(TaskConfigurationInterface $config): ?Task
{
$this->recipeLoader->loadRecipe('tideways.php');

set('tideways', [
'api_key' => $config->getApiKey(),
'name' => $config->getName(),
'name_prefix' => $config->getNamePrefix(),
'type' => $config->getType(),
'description' => $config->getDescription(),
'environment' => $config->getEnvironment(),
'service' => $config->getService(),
'compareAfterMinutes' => $config->getCompareAfterMinutes(),
]);

return null;
}

public function register(): void
{
after('deploy', 'deploy:tideways');
}
}
Loading