build logs
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (8.3) (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled
tests / ci (8.5) (push) Has been cancelled

This commit is contained in:
2026-04-24 14:59:20 +03:00
parent 579d1ad214
commit 9fbec77ac7
15 changed files with 1804 additions and 2 deletions

View File

@@ -0,0 +1,41 @@
<?php
namespace Database\Factories;
use App\Models\DockerImageBuild;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<DockerImageBuild>
*/
class DockerImageBuildFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'user_id' => User::factory(),
'image_name' => 'ghcr.io/acme/'.fake()->slug(2),
'image_tag' => 'latest',
'dockerfile_content' => implode("\n", [
'FROM alpine:3.20',
'RUN echo "building"',
]),
'environment' => [
['key' => 'APP_ENV', 'value' => 'production'],
],
'status' => DockerImageBuild::STATUS_QUEUED,
'build_output' => null,
'successful' => null,
'exit_code' => null,
'queued_at' => now(),
'started_at' => null,
'finished_at' => null,
];
}
}

View File

@@ -0,0 +1,42 @@
<?php
use App\Models\User;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('docker_image_builds', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(User::class)->constrained()->cascadeOnDelete();
$table->string('image_name');
$table->string('image_tag', 128);
$table->longText('dockerfile_content');
$table->json('environment')->nullable();
$table->string('status', 20)->index();
$table->longText('build_output')->nullable();
$table->boolean('successful')->nullable();
$table->integer('exit_code')->nullable();
$table->timestamp('queued_at')->nullable()->index();
$table->timestamp('started_at')->nullable();
$table->timestamp('finished_at')->nullable();
$table->timestamps();
$table->index(['user_id', 'id']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('docker_image_builds');
}
};