mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 22:17:19 +00:00
feat(deployments): support Docker image tags for preview deployments
Add end-to-end support for `docker_registry_image_tag` in preview and deployment queue flows. - Extend deploy API to accept `pull_request_id` alias and `docker_tag` for preview deploys - Persist preview-specific Docker tags on `application_previews` and `application_deployment_queues` - Pass tag through `queue_application_deployment()` and de-duplicate queued jobs by tag - Update deployment job logic to resolve and use preview Docker tags for dockerimage build packs - Update Livewire previews UI/state to manage per-preview tags and manual preview/tag inputs - Add migration for new tag columns and model fillable/casts updates - Add feature and unit tests covering API behavior and tag resolution
This commit is contained in:
1 parent
3fddc795f6
commit
61f47cc7ee
13 files changed
+468
-38
No files matched your search
@@ -16,6 +16,7 @@ use OpenApi\Attributes as OA;
|
||||
'application_id' => ['type' => 'string'],
|
||||
'deployment_uuid' => ['type' => 'string'],
|
||||
'pull_request_id' => ['type' => 'integer'],
|
||||
'docker_registry_image_tag' => ['type' => 'string', 'nullable' => true],
|
||||
'force_rebuild' => ['type' => 'boolean'],
|
||||
'commit' => ['type' => 'string'],
|
||||
'status' => ['type' => 'string'],
|
||||
@@ -67,6 +68,7 @@ class ApplicationDeploymentQueue extends Model
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'pull_request_id' => 'integer',
|
||||
'finished_at' => 'datetime',
|
||||
];
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ class ApplicationPreview extends BaseModel
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'application_id',
|
||||
'pull_request_id',
|
||||
'pull_request_html_url',
|
||||
'pull_request_issue_comment_id',
|
||||
@@ -18,9 +19,14 @@ class ApplicationPreview extends BaseModel
|
||||
'status',
|
||||
'git_type',
|
||||
'docker_compose_domains',
|
||||
'docker_registry_image_tag',
|
||||
'last_online_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'pull_request_id' => 'integer',
|
||||
];
|
||||
|
||||
protected static function booted()
|
||||
{
|
||||
static::forceDeleting(function ($preview) {
|
||||
|
||||
@@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
class DockerCleanupExecution extends BaseModel
|
||||
{
|
||||
protected $fillable = [
|
||||
'server_id',
|
||||
'status',
|
||||
'message',
|
||||
'cleanup_log',
|
||||
|
||||
Reference in new issue
Block a user