MCPcopy Index your code
hub / github.com/apache/devlake / Convert

Method Convert

backend/plugins/bamboo/models/deploy_build.go:67–94  ·  view source on GitHub ↗
(op *BambooOptions, envName string)

Source from the content-addressed store, hash-verified

65}
66
67func (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
96type ApiBambooDeployBuildAgent struct {
97 Id uint64 `json:"id"`

Callers 1

ExtractDeployBuildFunction · 0.95

Calls 1

unixForBambooDeployBuildFunction · 0.85

Tested by

no test coverage detected