refactor(cmd/joj3): add teapot env file path to conf [force rebuild]
This commit is contained in:
parent
0abca551ed
commit
2a58aec314
|
@ -42,6 +42,7 @@ type Conf struct {
|
||||||
}
|
}
|
||||||
Teapot struct {
|
Teapot struct {
|
||||||
LogPath string `default:"/home/tt/.cache/joint-teapot-debug.log"`
|
LogPath string `default:"/home/tt/.cache/joint-teapot-debug.log"`
|
||||||
|
EnvFilePath string `default:"/home/tt/.config/teapot/teapot.env"`
|
||||||
ScoreboardPath string `default:"scoreboard.csv"`
|
ScoreboardPath string `default:"scoreboard.csv"`
|
||||||
FailedTablePath string `default:"failed-table.md"`
|
FailedTablePath string `default:"failed-table.md"`
|
||||||
GradingRepoName string `default:""`
|
GradingRepoName string `default:""`
|
||||||
|
|
|
@ -21,7 +21,6 @@ func Run(conf *conf.Conf) error {
|
||||||
}
|
}
|
||||||
os.Setenv("LOG_FILE_PATH", conf.Teapot.LogPath)
|
os.Setenv("LOG_FILE_PATH", conf.Teapot.LogPath)
|
||||||
os.Setenv("_TYPER_STANDARD_TRACEBACK", "1")
|
os.Setenv("_TYPER_STANDARD_TRACEBACK", "1")
|
||||||
envFilePath := "/home/tt/.config/teapot/teapot.env"
|
|
||||||
sha := os.Getenv("GITHUB_SHA")
|
sha := os.Getenv("GITHUB_SHA")
|
||||||
actor := os.Getenv("GITHUB_ACTOR")
|
actor := os.Getenv("GITHUB_ACTOR")
|
||||||
repository := os.Getenv("GITHUB_REPOSITORY")
|
repository := os.Getenv("GITHUB_REPOSITORY")
|
||||||
|
@ -77,7 +76,7 @@ func Run(conf *conf.Conf) error {
|
||||||
skipFailedTableArg = "--skip-failed-table"
|
skipFailedTableArg = "--skip-failed-table"
|
||||||
}
|
}
|
||||||
if err := execCommand("joint-teapot", []string{
|
if err := execCommand("joint-teapot", []string{
|
||||||
"joj3-all", envFilePath, conf.Stage.OutputPath, actor,
|
"joj3-all", conf.Teapot.EnvFilePath, conf.Stage.OutputPath, actor,
|
||||||
conf.Teapot.GradingRepoName, repoName, runNumber,
|
conf.Teapot.GradingRepoName, repoName, runNumber,
|
||||||
conf.Teapot.ScoreboardPath, conf.Teapot.FailedTablePath,
|
conf.Teapot.ScoreboardPath, conf.Teapot.FailedTablePath,
|
||||||
conf.Name, sha, skipIssueArg, skipScoreboardArg,
|
conf.Name, sha, skipIssueArg, skipScoreboardArg,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user