1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/.github/workflows/parse_integration_test_list.go

22 lines
431 B
Go
Raw Normal View History

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))
}