forked from kubestellar/ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.prow.yaml
More file actions
175 lines (169 loc) · 5.21 KB
/
.prow.yaml
File metadata and controls
175 lines (169 loc) · 5.21 KB
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
presubmits:
- name: pull-kubestellar-ui-verify
always_run: true
decorate: true
clone_uri: 'https://github.com/kubestellar/ui'
spec:
containers:
- image: node:20
command:
- /bin/bash
- -c
- |
cd frontend
npm ci
npm run lint
resources:
requests:
memory: 2Gi
cpu: 1
ephemeral-storage: 4Gi
- name: pull-kubestellar-ui-build
always_run: true
decorate: true
clone_uri: 'https://github.com/kubestellar/ui'
spec:
containers:
- image: node:20
command:
- /bin/bash
- -c
- |
cd frontend
rm -rf ~/.npm ~/.cache node_modules
npm ci
npm run build
resources:
requests:
memory: 2Gi
cpu: 1
ephemeral-storage: 4Gi
- name: pull-kubestellar-ui-test
always_run: true
decorate: true
clone_uri: 'https://github.com/kubestellar/ui'
spec:
containers:
- image: node:20
command:
- /bin/bash
- -c
- |
cd frontend
rm -rf ~/.npm ~/.cache node_modules
npm ci
npm test
resources:
requests:
memory: 2Gi
cpu: 1
ephemeral-storage: 4Gi
- name: pull-kubestellar-ui-backend-verify
always_run: true
decorate: true
clone_uri: 'https://github.com/kubestellar/ui'
spec:
containers:
- image: golang:1.24
command:
- /bin/bash
- -c
- |
cd backend
go mod download
go vet ./...
resources:
requests:
memory: 1Gi
cpu: 1
ephemeral-storage: 4Gi
- name: pull-kubestellar-ui-backend-test
always_run: true
decorate: true
clone_uri: 'https://github.com/kubestellar/ui'
spec:
containers:
- image: golang:1.24
command:
- /bin/bash
- -c
- |
apt-get update && apt-get install -y redis-server redis-tools
redis-server --daemonize yes --port 6379 --bind 127.0.0.1 --save "" --appendonly no
echo "Waiting for Redis to start..."
sleep 3
if redis-cli ping | grep -q PONG; then
echo "✓ Redis is running"
else
echo "✗ Redis failed to start"
exit 1
fi
cd backend
go mod download
go test ./...
resources:
requests:
memory: 1Gi
cpu: 1
ephemeral-storage: 4Gi
postsubmits:
- name: post-kubestellar-ui-build-main
branches:
- ^main$
decorate: true
clone_uri: 'https://github.com/kubestellar/ui'
spec:
containers:
- image: quay.io/buildah/stable:latest
securityContext:
privileged: true
command:
- /bin/bash
- -c
- |
# Build and push frontend
cd frontend
buildah bud -t quay.io/kubestellar/ui:frontend-$(git rev-parse --short HEAD) -t quay.io/kubestellar/ui:frontend-latest .
buildah push quay.io/kubestellar/ui:frontend-$(git rev-parse --short HEAD)
buildah push quay.io/kubestellar/ui:frontend-latest
cd ..
# Build and push backend
cd backend
buildah bud -t quay.io/kubestellar/ui:backend-$(git rev-parse --short HEAD) -t quay.io/kubestellar/ui:backend-latest .
buildah push quay.io/kubestellar/ui:backend-$(git rev-parse --short HEAD)
buildah push quay.io/kubestellar/ui:backend-latest
resources:
requests:
memory: 2Gi
cpu: 1
ephemeral-storage: 4Gi
- name: post-kubestellar-ui-build-dev
branches:
- ^dev$
decorate: true
clone_uri: 'https://github.com/kubestellar/ui'
spec:
containers:
- image: quay.io/buildah/stable:latest
securityContext:
privileged: true
command:
- /bin/bash
- -c
- |
# Build and push frontend
cd frontend
buildah bud -t quay.io/kubestellar/ui:frontend-dev-$(git rev-parse --short HEAD) -t quay.io/kubestellar/ui:frontend-dev-latest .
buildah push quay.io/kubestellar/ui:frontend-dev-$(git rev-parse --short HEAD)
buildah push quay.io/kubestellar/ui:frontend-dev-latest
cd ..
# Build and push backend
cd backend
buildah bud -t quay.io/kubestellar/ui:backend-dev-$(git rev-parse --short HEAD) -t quay.io/kubestellar/ui:backend-dev-latest .
buildah push quay.io/kubestellar/ui:backend-dev-$(git rev-parse --short HEAD)
buildah push quay.io/kubestellar/ui:backend-dev-latest
resources:
requests:
memory: 2Gi
cpu: 1
ephemeral-storage: 4Gi