Prefer selected Coolify deployment commit
This commit is contained in:
@@ -629,6 +629,22 @@ it('injects selected API commit into Coolify runtime env unless explicitly set',
|
||||
expect($env['COMMIT_SHA'])->toBe($explicitCommit);
|
||||
});
|
||||
|
||||
it('uses the selected deployment commit before stale Coolify context commits', function (): void {
|
||||
$manager = new release_manager();
|
||||
$gitCommitSha = new ReflectionMethod(release_manager::class, 'releaseCoolifyGitCommitSha');
|
||||
$gitCommitSha->setAccessible(true);
|
||||
|
||||
$selectedCommit = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
|
||||
$staleCommit = 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb';
|
||||
|
||||
expect($gitCommitSha->invoke($manager, [
|
||||
'commit_sha' => $selectedCommit,
|
||||
], [
|
||||
'coolify_git_commit_sha' => $staleCommit,
|
||||
'git_commit_sha' => $staleCommit,
|
||||
]))->toBe($selectedCommit);
|
||||
});
|
||||
|
||||
it('injects selected frontend commit into Coolify runtime env for manifest builds', function (): void {
|
||||
$manager = new release_manager();
|
||||
$runtimeEnv = new ReflectionMethod(release_manager::class, 'releaseCoolifyRuntimeEnv');
|
||||
|
||||
Reference in New Issue
Block a user