-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.prow.yaml
192 lines (185 loc) · 4.72 KB
/
.prow.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
presubmits:
- name: nmath-unit-test
decorate: true
run_if_changed: "^.*.go$"
spec:
containers:
- image: nephio/gotests:1671656214984921088
command:
- make
args:
- unit
- name: nmath-lint
decorate: true
run_if_changed: "^.*.go$"
spec:
containers:
- image: nephio/gotests:1671656214984921088
command:
- make
args:
- lint
- name: nmath-test-gosec
decorate: true
run_if_changed: "^.*.go$"
spec:
containers:
- image: nephio/gotests:1671656214984921088
command:
- make
args:
- gosec
- name: nmath-test-license-header
decorate: true
run_if_changed: "^.*.go$"
spec:
containers:
- image: nephio/gotests:1671656214984921088
command:
- "/bin/sh"
- "-c"
- |
/usr/local/bin/checklicense.sh > ${ARTIFACTS}/license_headers_results.txt
- name: nmath-test-scancode-toolkit
decorate: true
run_if_changed: "^.*.go$"
spec:
containers:
- image: nephio/scancode-toolkit:v31.2.5
command:
- "/bin/sh"
args:
- "-c"
- |
/scancode-toolkit/scancode --ignore "whitelist.json" -clpeui -n 2 --html ${ARTIFACTS}/scancode_report.html . --tallies-with-details
resources:
requests:
cpu: 2
memory: 2Gi
- name: nmath-lichen
decorate: true
run_if_changed: "^.*.go$"
spec:
containers:
- image: nephio/gotests:1671656214984921088
command:
- "/usr/local/bin/lichen.sh"
- name: nmath-fossology
decorate: true
always_run: true
spec:
containers:
- image: fossology/fossology:scanner
command:
- "/bin/bash"
args:
- "-c"
- |
/bin/fossologyscanner --report SPDX_JSON repo nomos ojo copyright keyword
cp -R results ${ARTIFACTS}/
postsubmits:
- name: build-push-image
cluster: default
run_if_changed: "^VERSION$"
branches:
- main
- master
annotations:
description: Build and Push Image to DockerHub
decorate: true
decoration_config:
censor_secrets: true
max_concurrency: 1
spec:
containers:
- name: kaniko
image: gcr.io/kaniko-project/executor:debug
command:
- "/bin/sh"
- "-c"
- |
executor --context=${PWD} \
--dockerfile=Dockerfile --destination=nephio/nmath:${BUILD_ID}
volumeMounts:
- name: kaniko-secret
mountPath: /kaniko/.docker/
resources:
requests:
cpu: 2
memory: 2Gi
volumes:
- name: kaniko-secret
secret:
secretName: regcred
items:
- key: .dockerconfigjson
path: config.json
- name: image-nephio-test-sign
cluster: default
always_run: true
branches:
- "^v.*$"
annotations:
description: Build and Push Image to DockerHub when release tag is created
decorate: true
decoration_config:
censor_secrets: true
max_concurrency: 0
spec:
containers:
- name: kaniko
image: gcr.io/kaniko-project/executor:debug
command:
- "/bin/sh"
- "-c"
- |
executor --context=${PWD} \
--dockerfile=Dockerfile --destination=nephio/nmath:${PULL_BASE_REF}
volumeMounts:
- name: kaniko-secret
mountPath: /kaniko/.docker/
resources:
requests:
cpu: 1
memory: 1Gi
- name: nephio-image-signer
image: nephio/releaser:v0.0.2
command:
- "/bin/sh"
- "-c"
- |
/usr/local/bin/release docker.io nephio nmath ${PULL_BASE_REF}
volumeMounts:
- name: cosign-secret
mountPath: /root/.docker/
resources:
requests:
cpu: 1
memory: 64Mi
limits:
cpu: 1
memory: 128Mi
env:
- name: COSIGN_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: cosign-private-key
key: COSIGN_PRIVATE_KEY
- name: COSIGN_PASSWORD
valueFrom:
secretKeyRef:
name: cosign-private-key-passwd
key: COSIGN_PASSWORD
volumes:
- name: kaniko-secret
secret:
secretName: regcred
items:
- key: .dockerconfigjson
path: config.json
- name: cosign-secret
secret:
secretName: cosign-login
items:
- key: configjson
path: config.json