Skip to content

Commit 5f6eb2a

Browse files
committed
feat: support custom image names in the integration tests targets
By default it still falls back to the same name as the integration test step. Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
1 parent fc6afbe commit 5f6eb2a

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

internal/project/auto/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@ type Helm struct {
4848

4949
// IntegrationTests defines integration tests builder to be generated.
5050
type IntegrationTests struct {
51-
Tests []IntegrationTestConfig
51+
Tests []IntegrationTestConfig `yaml:"tests"`
5252
}
5353

5454
// IntegrationTestConfig defines the integration tests build configuration.
5555
type IntegrationTestConfig struct {
5656
Outputs map[string]map[string]string `yaml:"outputs"`
5757
Name string `yaml:"name"`
5858
Path string `yaml:"path"`
59+
ImageName string `yaml:"imageName"`
5960
EnableDockerImage bool `yaml:"enableDockerImage"`
6061
}

internal/project/auto/integration_tests.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,14 @@ func (builder *builder) BuildIntegrationTests() error {
4242
builder.targets = append(builder.targets, build)
4343

4444
if spec.EnableDockerImage {
45+
imageName := spec.Name
46+
47+
if spec.ImageName != "" {
48+
imageName = spec.ImageName
49+
}
50+
4551
image := common.NewImage(
46-
builder.meta, spec.Name,
52+
builder.meta, imageName,
4753
)
4854

4955
image.AddInput(build)

0 commit comments

Comments
 (0)