mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
2dfca180a7
* Dynamic version detection of Golang * Dynamic Golang integration tests run matrix * Golang timeout to build set at 5 min * Golang integration test timeout to run set at 10 min * Consumer tests timeout set at 20 min Co-authored-by: Alexey Matvievsky <alexey.matvievsky@sap.com>
22 lines
431 B
Go
22 lines
431 B
Go
package main
|
|
|
|
import (
|
|
"encoding/json"
|
|
"flag"
|
|
"fmt"
|
|
"github.com/ghodss/yaml"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
file := flag.String("file", "../../integration/github_actions_integration_test_list.yml", "Tests to be executed")
|
|
flag.Parse()
|
|
f, _ := os.ReadFile(*file)
|
|
var Matrix struct {
|
|
Run interface{} `json:"run,omitempty" yaml:"run"`
|
|
}
|
|
yaml.Unmarshal(f, &Matrix)
|
|
output, _ := json.Marshal(Matrix)
|
|
fmt.Println(string(output))
|
|
}
|