mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-16 03:15:14 +00:00
adjust order
This commit is contained in:
parent
85ece526fe
commit
efe3097eee
2 changed files with 9 additions and 9 deletions
|
@ -166,9 +166,9 @@ func (c *client) Init(ctx context.Context, workflowID string, state rpc.Workflow
|
|||
req := new(proto.InitRequest)
|
||||
req.Id = workflowID
|
||||
req.State = new(proto.WorkflowState)
|
||||
req.State.Error = state.Error
|
||||
req.State.Finished = state.Finished
|
||||
req.State.Started = state.Started
|
||||
req.State.Finished = state.Finished
|
||||
req.State.Error = state.Error
|
||||
for {
|
||||
_, err = c.client.Init(ctx, req)
|
||||
if err == nil {
|
||||
|
@ -204,9 +204,9 @@ func (c *client) Done(ctx context.Context, workflowID string, state rpc.Workflow
|
|||
req := new(proto.DoneRequest)
|
||||
req.Id = workflowID
|
||||
req.State = new(proto.WorkflowState)
|
||||
req.State.Error = state.Error
|
||||
req.State.Finished = state.Finished
|
||||
req.State.Started = state.Started
|
||||
req.State.Finished = state.Finished
|
||||
req.State.Error = state.Error
|
||||
for {
|
||||
_, err = c.client.Done(ctx, req)
|
||||
if err == nil {
|
||||
|
@ -276,11 +276,11 @@ func (c *client) Update(ctx context.Context, workflowID string, state rpc.StepSt
|
|||
req := new(proto.UpdateRequest)
|
||||
req.Id = workflowID
|
||||
req.State = new(proto.StepState)
|
||||
req.State.Error = state.Error
|
||||
req.State.ExitCode = int32(state.ExitCode)
|
||||
req.State.Finished = state.Finished
|
||||
req.State.Started = state.Started
|
||||
req.State.StepUuid = state.StepUUID
|
||||
req.State.Started = state.Started
|
||||
req.State.Finished = state.Finished
|
||||
req.State.ExitCode = int32(state.ExitCode)
|
||||
req.State.Error = state.Error
|
||||
for {
|
||||
_, err = c.client.Update(ctx, req)
|
||||
if err == nil {
|
||||
|
|
|
@ -30,9 +30,9 @@ type (
|
|||
// StepState defines the step state.
|
||||
StepState struct {
|
||||
StepUUID string `json:"step_uuid"`
|
||||
ExitCode int `json:"exit_code"`
|
||||
Started int64 `json:"started"`
|
||||
Finished int64 `json:"finished"`
|
||||
ExitCode int `json:"exit_code"`
|
||||
Error string `json:"error"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue