Merge remote-tracking branch 'origin/next' into feat/railpack

This commit is contained in:
Andras Bacsai committed 2026-04-17 07:01:27 +02:00
commit 451b7376ed
49 files changed
+631 -289

No files matched your search

+20
View File
@@ -99,3 +99,23 @@ it('escapes repository URLs in other deployment type', function () {
// The malicious payload should be escaped (escapeshellarg wraps and escapes quotes)
expect($command)->toContain("'https://github.com/user/repo.git'\\''");
});
it('preserves ssh scheme URLs with custom ports in deploy_key commands', function () {
$deploymentUuid = 'test-deployment-uuid';
$application = new Application;
$application->git_branch = 'master';
$application->git_repository = 'ssh://git@192.168.56.11:22222/User/Repo.git';
$application->private_key_id = 1;
$privateKey = new PrivateKey;
$privateKey->private_key = 'fake-private-key';
$application->setRelation('private_key', $privateKey);
$result = $application->generateGitLsRemoteCommands($deploymentUuid, false);
expect($result['commands'])
->toContain("'ssh://git@192.168.56.11:22222/User/Repo.git'")
->toContain('-p 22222')
->not->toContain('ssh:/git@192.168.56.11:22222/User/Repo.git');
});
@@ -0,0 +1,28 @@
<?php
function expectRockyInstallScriptToUseRhelRepo(string $path): void
{
$installScript = file_get_contents(base_path($path));
expect($installScript)
->toContain('install_docker_from_rhel_repo() {')
->toContain('echo " - Installing Docker from the RHEL repository for Rocky Linux..."')
->toContain('rm -f /etc/yum.repos.d/docker-ce.repo /etc/yum.repos.d/docker-ce-staging.repo')
->toContain('dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo')
->toContain('dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin')
->toContain('systemctl --now enable docker')
->toContain('"rocky")')
->toContain('install_docker_from_rhel_repo')
->not->toContain('dnf -y -q --setopt=install_weak_deps=False install dnf-plugins-core')
->not->toContain('dnf5 config-manager addrepo --overwrite --save-filename=docker-ce.repo --from-repofile=https://download.docker.com/linux/rhel/docker-ce.repo')
->not->toContain('dnf makecache')
->not->toContain('"ubuntu" | "debian" | "raspbian" | "centos" | "fedora" | "rhel" | "rocky" | "sles")');
}
it('uses the rocky linux documented docker install flow in the stable install script', function () {
expectRockyInstallScriptToUseRhelRepo('scripts/install.sh');
});
it('uses the rocky linux documented docker install flow in the nightly install script', function () {
expectRockyInstallScriptToUseRhelRepo('other/nightly/install.sh');
});