forked from nephio-project/oai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.prow.yaml
101 lines (98 loc) · 2.38 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
presubmits:
- name: oai-operator-unit-test
decorate: true
run_if_changed: "^.*.go$"
spec:
containers:
- image: nephio/gotests:7
command:
- "/bin/sh"
args:
- "-c"
- |
make unit
- name: oai-operator-lint
decorate: true
run_if_changed: "^.*.go$"
spec:
containers:
- image: nephio/gotests:7
command:
- "/bin/sh"
args:
- "-c"
- |
make lint
- name: oai-operator-gosec
decorate: true
run_if_changed: "^.*.go$"
spec:
containers:
- image: nephio/gotests:7
command:
- "/bin/sh"
args:
- "-c"
- |
make gosec
- name: oai-operator-license-header-check
decorate: true
run_if_changed: "^.*.go$"
spec:
containers:
- image: nephio/gotests:7
command:
- "/bin/sh"
args:
- "-c"
- |
"/usr/local/bin/checklicense.sh"
- name: presubmit-oai-operator-lichen
decorate: true
always_run: true
spec:
containers:
- image: nephio/gotests:7
command:
- "/bin/bash"
args:
- "-c"
- |
for i in \
$(egrep -rl --null --include \*.go 'package\s+main\b' | xargs -0 -L 1 dirname | sort -u | xargs -d '\n' -L 1 printf "%s " ) ; \
do cd $i; echo $i; rm -f /tmp/cmd; go build -o "/tmp/cmd"; lichen -c /etc/lichen.yaml "/tmp/cmd" || exit 1; cd - ;done
- name: build-push-pre-image-oai
cluster: default
always_run: true
branches:
- "main"
annotations:
description: Build and Push Presubmit Image to Hub
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/oai-ran-controller:${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