Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added projectType and step startTime #657

Merged
merged 2 commits into from
Mar 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions cli/run_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,12 +552,13 @@ func activateAndRunSteps(
}

stepResults := models.StepRunResultsModel{
StepInfo: stepInfoCopy,
Status: resultCode,
Idx: buildRunResults.ResultsCount(),
RunTime: time.Now().Sub(stepStartTime),
ErrorStr: errStr,
ExitCode: exitCode,
StepInfo: stepInfoCopy,
Status: resultCode,
Idx: buildRunResults.ResultsCount(),
RunTime: time.Now().Sub(stepStartTime),
ErrorStr: errStr,
ExitCode: exitCode,
StartTime: stepStartTime,
}

isExitStatusError := true
Expand Down Expand Up @@ -1081,6 +1082,7 @@ func runWorkflowWithConfiguration(
buildRunResults := models.BuildRunResultsModel{
StartTime: startTime,
StepmanUpdates: map[string]int{},
ProjectType: bitriseConfig.ProjectType,
}

buildRunResults, err = activateAndRunWorkflow(
Expand Down
14 changes: 8 additions & 6 deletions models/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ type StepIDData struct {

// BuildRunResultsModel ...
type BuildRunResultsModel struct {
ProjectType string `json:"project_type" yaml:"project_type"`
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StartTime time.Time `json:"start_time" yaml:"start_time"`
StepmanUpdates map[string]int `json:"stepman_updates" yaml:"stepman_updates"`
SuccessSteps []StepRunResultsModel `json:"success_steps" yaml:"success_steps"`
Expand All @@ -115,12 +116,13 @@ type BuildRunResultsModel struct {

// StepRunResultsModel ...
type StepRunResultsModel struct {
StepInfo stepmanModels.StepInfoModel `json:"step_info" yaml:"step_info"`
Status int `json:"status" yaml:"status"`
Idx int `json:"idx" yaml:"idx"`
RunTime time.Duration `json:"run_time" yaml:"run_time"`
ErrorStr string `json:"error_str" yaml:"error_str"`
ExitCode int `json:"exit_code" yaml:"exit_code"`
StepInfo stepmanModels.StepInfoModel `json:"step_info" yaml:"step_info"`
Status int `json:"status" yaml:"status"`
Idx int `json:"idx" yaml:"idx"`
RunTime time.Duration `json:"run_time" yaml:"run_time"`
StartTime time.Time `json:"start_time" yaml:"start_time"`
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ErrorStr string `json:"error_str" yaml:"error_str"`
ExitCode int `json:"exit_code" yaml:"exit_code"`
}

// TestResultStepInfo ...
Expand Down