Skip to content

Commit f6bcdc5

Browse files
committedFeb 24, 2021
feature: add annotations to pipelines for getting syncstatus
Signed-off-by: shaowenchen <mail@chenshaowen.com>
1 parent 000d309 commit f6bcdc5

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ bin/
1919

2020
# Vscode files
2121
.vscode/
22+
__debug_bin
2223

2324
# OSX trash
2425
.DS_Store

‎pkg/kapis/devops/v1alpha2/devops.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ func (h *ProjectPipelineHandler) ListPipelines(req *restful.Request, resp *restf
112112
} else {
113113
pipelineMap[pipeline.Name] = i
114114
pipelineList.Items[i] = clientDevOps.Pipeline{
115-
Name: pipeline.Name,
115+
Name: pipeline.Name,
116+
Annotations: pipeline.Annotations,
116117
}
117118
}
118119
}

‎pkg/simple/client/devops/pipeline.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ type PipelineList struct {
3131

3232
// GetPipeline & SearchPipelines
3333
type Pipeline struct {
34-
Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability." `
35-
Links struct {
34+
Annotations map[string]string `json:"annotations,omitempty" description:"Add annotations from crd" `
35+
Class string `json:"_class,omitempty" description:"It’s a fully qualified name and is an identifier of the producer of this resource's capability." `
36+
Links struct {
3637
Self struct {
3738
Class string `json:"_class,omitempty"`
3839
Href string `json:"href,omitempty"`

0 commit comments

Comments
 (0)
Please sign in to comment.