Deployment environments

* Development, staging, and production environment types
* Protected-environment support
* Deployment targets
* Local, SSH, Docker, and Kubernetes driver foundation
* Deployment pipelines
* Configurable pipeline steps
* Manual and approval-based releases
* Deployment release history
* Individual deployment-step tracking
* HTTP health checks
* Response-time tracking
* Rollback records
* Secret-reference metadata
* Encrypted target configuration
* Encrypted environment variables
* Administration dashboard
* Authenticated API endpoints
* Health-check command
* Release-history pruning command
* Permissions
* Sidebar integration
* Module registration
* Feature test
This commit is contained in:
Mark Gregory
2026-07-24 13:57:56 +01:00
parent f09a680531
commit bc9427ac33
26 changed files with 377 additions and 1 deletions
@@ -0,0 +1,16 @@
<?php
namespace Modules\CloudDevOps\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
final class DeploymentEnvironment extends Model
{
protected $guarded = [];
protected function casts(): array { return ['variables' => 'encrypted:array', 'is_protected' => 'boolean']; }
public function targets(): HasMany { return $this->hasMany(DeploymentTarget::class, 'environment_id'); }
public function pipelines(): HasMany { return $this->hasMany(DeploymentPipeline::class, 'environment_id'); }
public function releases(): HasMany { return $this->hasMany(DeploymentRelease::class, 'environment_id'); }
public function healthChecks(): HasMany { return $this->hasMany(DeploymentHealthCheck::class, 'environment_id'); }
}
@@ -0,0 +1,4 @@
<?php
namespace Modules\CloudDevOps\Models;
use Illuminate\Database\Eloquent\Model;
final class DeploymentHealthCheck extends Model { protected $guarded = []; protected function casts(): array { return ['checked_at' => 'datetime']; } }
@@ -0,0 +1,4 @@
<?php
namespace Modules\CloudDevOps\Models;
use Illuminate\Database\Eloquent\Model;
final class DeploymentPipeline extends Model { protected $guarded = []; protected function casts(): array { return ['steps' => 'array', 'requires_approval' => 'boolean', 'is_active' => 'boolean']; } }
@@ -0,0 +1,6 @@
<?php
namespace Modules\CloudDevOps\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
final class DeploymentRelease extends Model { protected $guarded = []; protected function casts(): array { return ['metadata' => 'array', 'started_at' => 'datetime', 'completed_at' => 'datetime']; } public function environment(): BelongsTo { return $this->belongsTo(DeploymentEnvironment::class, 'environment_id'); } public function steps(): HasMany { return $this->hasMany(DeploymentStep::class, 'release_id')->orderBy('position'); } }
@@ -0,0 +1,4 @@
<?php
namespace Modules\CloudDevOps\Models;
use Illuminate\Database\Eloquent\Model;
final class DeploymentRollback extends Model { protected $guarded = []; }
@@ -0,0 +1,4 @@
<?php
namespace Modules\CloudDevOps\Models;
use Illuminate\Database\Eloquent\Model;
final class DeploymentSecret extends Model { protected $guarded = []; protected function casts(): array { return ['rotated_at' => 'datetime']; } }
@@ -0,0 +1,4 @@
<?php
namespace Modules\CloudDevOps\Models;
use Illuminate\Database\Eloquent\Model;
final class DeploymentStep extends Model { protected $guarded = []; protected function casts(): array { return ['started_at' => 'datetime', 'completed_at' => 'datetime']; } }
@@ -0,0 +1,4 @@
<?php
namespace Modules\CloudDevOps\Models;
use Illuminate\Database\Eloquent\Model;
final class DeploymentTarget extends Model { protected $guarded = []; protected function casts(): array { return ['configuration' => 'encrypted:array', 'is_active' => 'boolean']; } }