feat: support scoreboard & failed table path in conf
This commit is contained in:
parent
1fe7e13c2c
commit
67e222aa59
|
@ -20,6 +20,8 @@ type Conf struct {
|
||||||
OutputPath string `default:"joj3_result.json"`
|
OutputPath string `default:"joj3_result.json"`
|
||||||
GradingRepoName string `default:""`
|
GradingRepoName string `default:""`
|
||||||
SkipTeapot bool `default:"true"`
|
SkipTeapot bool `default:"true"`
|
||||||
|
ScoreboardPath string `default:"scoreboard.csv"`
|
||||||
|
FailedTablePath string `default:"failed-table.md"`
|
||||||
Stages []struct {
|
Stages []struct {
|
||||||
Name string
|
Name string
|
||||||
Group string
|
Group string
|
||||||
|
|
|
@ -29,7 +29,7 @@ func Run(conf conf.Conf) error {
|
||||||
repoName := repoParts[1]
|
repoName := repoParts[1]
|
||||||
cmd := exec.Command("joint-teapot", "joj3-scoreboard",
|
cmd := exec.Command("joint-teapot", "joj3-scoreboard",
|
||||||
envFilePath, conf.OutputPath, actor, conf.GradingRepoName, repoName,
|
envFilePath, conf.OutputPath, actor, conf.GradingRepoName, repoName,
|
||||||
runNumber) // #nosec G204
|
runNumber, conf.ScoreboardPath) // #nosec G204
|
||||||
output, err := cmd.CombinedOutput()
|
output, err := cmd.CombinedOutput()
|
||||||
slog.Info("joint-teapot joj3-scoreboard", "output", string(output))
|
slog.Info("joint-teapot joj3-scoreboard", "output", string(output))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -38,7 +38,7 @@ func Run(conf conf.Conf) error {
|
||||||
}
|
}
|
||||||
cmd = exec.Command("joint-teapot", "joj3-failed-table",
|
cmd = exec.Command("joint-teapot", "joj3-failed-table",
|
||||||
envFilePath, conf.OutputPath, actor, conf.GradingRepoName, repoName,
|
envFilePath, conf.OutputPath, actor, conf.GradingRepoName, repoName,
|
||||||
runNumber) // #nosec G204
|
runNumber, conf.FailedTablePath) // #nosec G204
|
||||||
output, err = cmd.CombinedOutput()
|
output, err = cmd.CombinedOutput()
|
||||||
slog.Info("joint-teapot joj3-failed-table", "output", string(output))
|
slog.Info("joint-teapot joj3-failed-table", "output", string(output))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user