Skip to content

Commit e883bfb

Browse files
Zhuxiaoyangks-ci-bot
Zhuxiaoyang
authored andcommitted
add output result (#99)
* add output result Signed-off-by: soulseen <[email protected]> * update annotation to pod Signed-off-by: soulseen <[email protected]>
1 parent b04bdd7 commit e883bfb

13 files changed

+497
-20
lines changed

config/crds/devops_v1alpha1_s2ibuilder.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ spec:
248248
items:
249249
type: string
250250
type: array
251+
outputBuildResult:
252+
description: Whether output build result to status.
253+
type: boolean
251254
outputImageName:
252255
description: OutputImageName is a result image name without tag,
253256
default is latest. tag will append to ImageName in the end

config/crds/devops_v1alpha1_s2irun.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
- JSONPath: .status.completionTime
2020
name: CompletionTime
2121
type: date
22-
- JSONPath: .status.imageName
22+
- JSONPath: .status.s2iBuildResult.imageName
2323
name: ImageName
2424
type: string
2525
group: devops.kubesphere.io
@@ -84,9 +84,6 @@ spec:
8484
represented in RFC3339 form and is in UTC.
8585
format: date-time
8686
type: string
87-
imageName:
88-
description: ImageName is the name of artifact
89-
type: string
9087
kubernetesJobName:
9188
description: KubernetesJobName is the job name in k8s
9289
type: string

config/manager/manager.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ spec:
4747
- name: SECRET_NAME
4848
value: $(WEBHOOK_SECRET_NAME)
4949
- name: S2IIMAGENAME
50-
value: kubespheredev/s2irun:v0.0.2
50+
value: kubespheredev/s2irun:v0.0.3
5151
resources:
5252
limits:
5353
cpu: 100m

config/rbac/rbac_role.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ rules:
9191
- get
9292
- list
9393
- watch
94+
- update
95+
- patch
9496
- apiGroups:
9597
- apps
9698
resources:
@@ -130,6 +132,33 @@ rules:
130132
- secrets
131133
verbs:
132134
- get
135+
- apiGroups:
136+
- ""
137+
resources:
138+
- serviceaccounts
139+
verbs:
140+
- get
141+
- list
142+
- watch
143+
- create
144+
- apiGroups:
145+
- rbac.authorization.k8s.io
146+
resources:
147+
- rolebindings
148+
verbs:
149+
- get
150+
- list
151+
- watch
152+
- create
153+
- apiGroups:
154+
- rbac.authorization.k8s.io
155+
resources:
156+
- roles
157+
verbs:
158+
- get
159+
- list
160+
- watch
161+
- create
133162
- apiGroups:
134163
- admissionregistration.k8s.io
135164
resources:

config/samples/devops_v1alpha1_s2ibuilder.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ spec:
1919
nodeAffinityValues: ["affinityValue1"]
2020
taintKey: "taint1"
2121
buildVolumes: ["s2i_python35_cache:/opt/app-root/lib"]
22+
outputBuildResult: true

deploy/s2ioperator.yaml

+35-6
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ spec:
248248
items:
249249
type: string
250250
type: array
251+
outputBuildResult:
252+
description: Whether output build result to status.
253+
type: boolean
251254
outputImageName:
252255
description: OutputImageName is a result image name without tag,
253256
default is latest. tag will append to ImageName in the end
@@ -612,7 +615,7 @@ spec:
612615
- JSONPath: .status.completionTime
613616
name: CompletionTime
614617
type: date
615-
- JSONPath: .status.imageName
618+
- JSONPath: .status.s2iBuildResult.imageName
616619
name: ImageName
617620
type: string
618621
group: devops.kubesphere.io
@@ -677,9 +680,6 @@ spec:
677680
represented in RFC3339 form and is in UTC.
678681
format: date-time
679682
type: string
680-
imageName:
681-
description: ImageName is the name of artifact
682-
type: string
683683
kubernetesJobName:
684684
description: KubernetesJobName is the job name in k8s
685685
type: string
@@ -796,6 +796,8 @@ rules:
796796
- get
797797
- list
798798
- watch
799+
- update
800+
- patch
799801
- apiGroups:
800802
- apps
801803
resources:
@@ -835,6 +837,33 @@ rules:
835837
- secrets
836838
verbs:
837839
- get
840+
- apiGroups:
841+
- ""
842+
resources:
843+
- serviceaccounts
844+
verbs:
845+
- get
846+
- list
847+
- watch
848+
- create
849+
- apiGroups:
850+
- rbac.authorization.k8s.io
851+
resources:
852+
- rolebindings
853+
verbs:
854+
- get
855+
- list
856+
- watch
857+
- create
858+
- apiGroups:
859+
- rbac.authorization.k8s.io
860+
resources:
861+
- roles
862+
verbs:
863+
- get
864+
- list
865+
- watch
866+
- create
838867
- apiGroups:
839868
- admissionregistration.k8s.io
840869
resources:
@@ -1011,8 +1040,8 @@ spec:
10111040
- name: SECRET_NAME
10121041
value: webhook-server-secret
10131042
- name: S2IIMAGENAME
1014-
value: kubespheredev/s2irun:v0.0.2
1015-
image: kubespheredev/s2ioperator:v0.0.11
1043+
value: kubespheredev/s2irun:v0.0.3
1044+
image: kubespheredev/s2ioperator:advanced-2.1.0
10161045
imagePullPolicy: Always
10171046
name: manager
10181047
ports:

pkg/apis/devops/v1alpha1/openapi_generated.go

+157-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/devops/v1alpha1/s2ibuilder_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,9 @@ type S2iConfig struct {
419419

420420
// The values of Node Affinity.
421421
NodeAffinityValues []string `json:"nodeAffinityValues,omitempty"`
422+
423+
// Whether output build result to status.
424+
OutputBuildResult bool `json:"outputBuildResult,omitempty"`
422425
}
423426

424427
type UserDefineTemplate struct {

0 commit comments

Comments
 (0)