Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
Add Group field to BuildInfo
Browse files Browse the repository at this point in the history
Closes #104
  • Loading branch information
agis committed Sep 26, 2018
1 parent 65b3ef2 commit 5ff4cb1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/mistryd/public/templates/show.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ <h4> Logs </h4>
const state = {{.State}};

jobInfo.innerHTML += "Project: ".big() + {{.Project}} + "<br>";
jobInfo.innerHTML += "Group: ".big() + {{.BuildInfo.Group}} + "<br>";
jobInfo.innerHTML += "State: ".big() + {{.State}} + "<br>";
jobInfo.innerHTML += "Started At: ".big() + new Date({{.BuildInfo.StartedAt}}) + "<br>";
jobInfo.innerHTML += "Duration: ".big() + {{.BuildInfo.Duration}} + "<br>";
Expand Down
1 change: 1 addition & 0 deletions cmd/mistryd/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func (s *Server) Work(ctx context.Context, j *Job) (buildInfo *types.BuildInfo,
j.BuildInfo.Params = j.Params
j.BuildInfo.StartedAt = j.StartedAt
j.BuildInfo.URL = getJobURL(j)
j.BuildInfo.Group = j.Group

added := s.jq.Add(j)
if added {
Expand Down
3 changes: 3 additions & 0 deletions pkg/types/build_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ type BuildInfo struct {
// Params are the job build parameters
Params Params

// Group is the job group
Group string

// Path is the absolute path where the build artifacts are located.
Path string

Expand Down

0 comments on commit 5ff4cb1

Please sign in to comment.