get deployment plan

This commit is contained in:
2025-05-22 17:19:28 +01:00
parent bfe0f8eabf
commit 4051afca4e
6 changed files with 50 additions and 17 deletions

View File

@@ -24,13 +24,14 @@ class DeployService implements ShouldQueue
public function handle(): void
{
$driver = $this->service->driver();
$deploymentPlan = $driver->getDeploymentPlan($this->deployment->hash);
$this->service->update([
'status' => ServiceStatus::INSTALLING,
]);
$this->deployment = $this->service->deployments()->create([
'status' => DeploymentStatus::PENDING,
]);
foreach ($driver->deploymentPlan->steps as $index => $plannedStep) {
foreach ($deploymentPlan->steps as $index => $plannedStep) {
$step = $this->deployment->steps()->create([
'order' => $index + 1,
'status' => DeploymentStatus::PENDING,