mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
fix(applications): allow environment variable references in image tags
Closes #10642
This commit is contained in:
@@ -139,3 +139,15 @@ it('correctly parses image when user provides digest-decorated name with colon h
|
||||
->and($parser->getTag())->toBe($hash)
|
||||
->and($parser->isImageHash())->toBeTrue();
|
||||
});
|
||||
|
||||
it('parses a tag with a default value as one tag', function (string $imageString, string $imageName) {
|
||||
$parser = new DockerImageParser;
|
||||
$parser->parse($imageString);
|
||||
|
||||
expect($parser->getFullImageNameWithoutTag())->toBe($imageName)
|
||||
->and($parser->getTag())->toBe('${API_VERSION:-latest}')
|
||||
->and($parser->isImageHash())->toBeFalse();
|
||||
})->with([
|
||||
'image' => ['nginx:${API_VERSION:-latest}', 'nginx'],
|
||||
'registry image with port' => ['localhost:5000/team/app:${API_VERSION:-latest}', 'localhost:5000/team/app'],
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user