From 1d8d5b55bf6379b969dbcde99abc87faa5963ea1 Mon Sep 17 00:00:00 2001 From: lukaszcl <120112546+lukaszcl@users.noreply.github.com> Date: Tue, 10 Sep 2024 11:10:59 +0200 Subject: [PATCH] Add TestArtifactOnFailureStr --- tools/citool/cmd/filter_cmd.go | 2 ++ tools/citool/cmd/types.go | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/citool/cmd/filter_cmd.go b/tools/citool/cmd/filter_cmd.go index 20ba6b2a4..ea0d7d029 100644 --- a/tools/citool/cmd/filter_cmd.go +++ b/tools/citool/cmd/filter_cmd.go @@ -30,6 +30,7 @@ func filterTests(allTests []CITestConf, workflow, testType, ids string, envresol if workflowMatch && typeMatch && idMatch { test.IDSanitized = sanitizeTestID(test.ID) + test.TestArtifactOnFailureStr = strings.Join(test.TestArtifactOnFailure, "\n") filteredTests = append(filteredTests, test) } if envresolve { @@ -72,6 +73,7 @@ func filterAndMergeTests(allTests []CITestConf, workflow, testType, base64Tests test.TestEnvVars[k] = v } test.IDSanitized = sanitizeTestID(test.ID) + test.TestArtifactOnFailureStr = strings.Join(test.TestArtifactOnFailure, "\n") filteredTests = append(filteredTests, test) } if envresolve { diff --git a/tools/citool/cmd/types.go b/tools/citool/cmd/types.go index fc74fb482..7ee3e3b3a 100644 --- a/tools/citool/cmd/types.go +++ b/tools/citool/cmd/types.go @@ -18,7 +18,8 @@ type CITestConf struct { TestConfigOverridePath string `yaml:"test_config_override_path" json:"test_config_override_path"` TestSecretsRequired bool `yaml:"test_secrets_required" json:"test_secrets_required"` TestEnvVars map[string]string `yaml:"test_env_vars" json:"test_env_vars"` - TestArtifactOnFailure []string `yaml:"test_artifacts_on_failure" json:"test_artifacts_on_failure"` + TestArtifactOnFailure []string `yaml:"test_artifacts_on_failure" json:"-"` + TestArtifactOnFailureStr string `json:"test_artifacts_on_failure"` // TestArtifactOnFailure in string format with new lines to be used in Github Actions RemoteRunnerMemory string `yaml:"remote_runner_memory" json:"remote_runner_memory"` PyroscopeEnv string `yaml:"pyroscope_env" json:"pyroscope_env"` Workflows []string `yaml:"workflows" json:"workflows"`