Skip to content

Commit

Permalink
underway
Browse files Browse the repository at this point in the history
  • Loading branch information
neel-bp committed Apr 3, 2023
1 parent 5e07e89 commit 7b9cde7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions core/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func Job(args ...any) error {
if ok {
buildTime := project.LastBuildStart
steps := project.StepResults
status := project.BuildStatus
description := "step ran successfully"
if err != nil {
description = err.Error()
Expand All @@ -130,6 +131,7 @@ func Job(args ...any) error {
ResultMap.Map[projectName] = JobState{
LastBuildStart: buildTime,
StepResults: steps,
BuildStatus: status,
}
ResultMap.Mu.Unlock()
} else {
Expand Down
8 changes: 6 additions & 2 deletions example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

branch = "master"
secret = "xxx"
cwd = 'c:\games'
cwd = '/home/neelu/work'
steps = [
["git","--help"],
["echo","start"],
["sleep","2"],
["echo","mid"],
["sleep","3"],
["echo","end"]
]
stepTimeout = 600
1 change: 1 addition & 0 deletions jobqueue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func (jq *JobQueue) startWorker(l *log.Logger, wg *sync.WaitGroup) {
if err != nil {
l.Println(err)
}
l.Println("job done")
}
wg.Done()
}
Expand Down

0 comments on commit 7b9cde7

Please sign in to comment.