(op *BambooOptions, envName string)
| 65 | } |
| 66 | |
| 67 | func (api *ApiBambooDeployBuild) Convert(op *BambooOptions, envName string) []*BambooDeployBuild { |
| 68 | var result []*BambooDeployBuild |
| 69 | tmpl := BambooDeployBuild{ |
| 70 | ConnectionId: op.ConnectionId, |
| 71 | PlanKey: op.PlanKey, |
| 72 | DeploymentVersionName: api.DeploymentVersionName, |
| 73 | DeployBuildId: api.Id, |
| 74 | DeploymentState: api.DeploymentState, |
| 75 | LifeCycleState: api.LifeCycleState, |
| 76 | StartedDate: unixForBambooDeployBuild(api.StartedDate), |
| 77 | QueuedDate: unixForBambooDeployBuild(api.QueuedDate), |
| 78 | ExecutedDate: unixForBambooDeployBuild(api.ExecutedDate), |
| 79 | FinishedDate: unixForBambooDeployBuild(api.FinishedDate), |
| 80 | ReasonSummary: api.ReasonSummary, |
| 81 | ApiBambooOperations: api.Operations, |
| 82 | Environment: envName, |
| 83 | PlanBranchName: api.DeploymentVersion.PlanBranchName, |
| 84 | EnvKey: api.Key.EntityKey.Key, |
| 85 | } |
| 86 | for _, item := range api.DeploymentVersion.Items { |
| 87 | build := tmpl |
| 88 | build.PlanResultKey = item.PlanResultKey.Key |
| 89 | if build.PlanResultKey != "" { |
| 90 | result = append(result, &build) |
| 91 | } |
| 92 | } |
| 93 | return result |
| 94 | } |
| 95 | |
| 96 | type ApiBambooDeployBuildAgent struct { |
| 97 | Id uint64 `json:"id"` |
no test coverage detected