refactor(cmd/joj3): add teapot env file path to conf [force rebuild]
All checks were successful
submodules sync / sync (push) Successful in 40s
build / build (push) Successful in 1m23s
build / trigger-build-image (push) Successful in 9s

This commit is contained in:
张泊明518370910136 2024-10-27 06:27:17 -04:00
parent 0abca551ed
commit 2a58aec314
GPG Key ID: D47306D7062CDA9D
2 changed files with 2 additions and 2 deletions

View File

@ -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:""`

View File

@ -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,