mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
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))
|
||
|
}
|