| Matthias Andreas Benkard | c756035 | 2021-09-05 12:25:13 +0200 | [diff] [blame] | 1 | --- |
| 2 | apiVersion: apps/v1 |
| 3 | kind: Deployment |
| 4 | metadata: |
| 5 | name: git |
| 6 | namespace: mulk |
| 7 | labels: |
| 8 | name: git |
| 9 | k8s-app: git |
| 10 | spec: |
| 11 | replicas: 1 |
| 12 | selector: |
| 13 | matchLabels: |
| 14 | k8s-app: git |
| 15 | name: git |
| 16 | template: |
| 17 | metadata: |
| 18 | labels: |
| 19 | name: git |
| 20 | k8s-app: git |
| 21 | spec: |
| Matthias Andreas Benkard | c756035 | 2021-09-05 12:25:13 +0200 | [diff] [blame] | 22 | containers: |
| Matthias Andreas Benkard | faf5a09 | 2024-03-06 12:51:07 +0100 | [diff] [blame] | 23 | - name: cgit |
| Matthias Andreas Benkard | 68157fd | 2026-11-05 15:58:35 +0100 | [diff] [blame] | 24 | # Serves cgit at / (lighttpd rewrites /<repo>/... to cgit.cgi?url=...). |
| 25 | # The image's own sshd listens on :22 and is unused; gitolite is on :2222. |
| 26 | image: docker.io/woahbase/alpine-cgit:1.3_20260805 |
| 27 | imagePullPolicy: IfNotPresent |
| 28 | env: |
| 29 | # Formatters for the about pages and syntax highlighting. |
| 30 | - name: S6_NEEDED_PACKAGES |
| 31 | value: "groff python3 py3-docutils py3-markdown py3-pygments" |
| 32 | # /home/git is gitolite's volume (owned by gitolite's uid 106), so |
| 33 | # cgit must not chown it: CGIT_SKIP_PERMFIX skips cgit's permfix, |
| 34 | # and an empty S6_USER skips the base image's usermod/chown of the |
| 35 | # user's home (scripts fall back to user "git"). |
| 36 | - name: CGIT_SKIP_PERMFIX |
| 37 | value: "true" |
| 38 | - name: S6_USER |
| 39 | value: "" |
| Matthias Andreas Benkard | 076bc97 | 2026-11-05 16:42:09 +0100 | [diff] [blame^] | 40 | # The image's sshd setup runs `chown -R git ~/.ssh`, and |
| 41 | # /home/git/.ssh is gitolite's .ssh (same volume); give cgit's |
| 42 | # user a home inside the container instead. |
| 43 | - name: S6_USERHOME |
| 44 | value: /var/lib/cgit |
| 45 | # The setup then generates a key there as PUID; must match the |
| 46 | # image's git user (1001) that owns that directory. |
| 47 | - name: PUID |
| 48 | value: "1001" |
| 49 | - name: CGIT_REPODIR |
| 50 | value: /home/git/repositories |
| Matthias Andreas Benkard | c756035 | 2021-09-05 12:25:13 +0200 | [diff] [blame] | 51 | resources: |
| 52 | limits: |
| 53 | cpu: 2000m |
| 54 | memory: 100Mi |
| 55 | requests: |
| 56 | cpu: 10m |
| 57 | memory: 50Mi |
| 58 | ports: |
| 59 | - containerPort: 80 |
| 60 | name: cgit-http |
| 61 | protocol: TCP |
| 62 | volumeMounts: |
| 63 | - name: data |
| 64 | mountPath: /home/git |
| 65 | - name: config |
| 66 | mountPath: /etc/cgitrc |
| 67 | subPath: cgitrc |
| 68 | readOnly: true |
| Matthias Andreas Benkard | 8c9b613 | 2024-03-06 12:51:33 +0100 | [diff] [blame] | 69 | - name: gitolite |
| Matthias Andreas Benkard | 7cc90d4 | 2026-11-05 14:43:06 +0100 | [diff] [blame] | 70 | image: docker.io/elsdoerfer/gitolite:v3.6.15-ubuntu-26.04-20260824.3 |
| 71 | imagePullPolicy: IfNotPresent |
| Matthias Andreas Benkard | 8c9b613 | 2024-03-06 12:51:33 +0100 | [diff] [blame] | 72 | env: [] |
| 73 | #tty: true |
| 74 | #stdin: true |
| 75 | #command: |
| 76 | # - /bin/cat |
| 77 | resources: |
| 78 | limits: |
| 79 | cpu: 2000m |
| 80 | memory: 100Mi |
| 81 | requests: |
| 82 | cpu: 10m |
| 83 | memory: 50Mi |
| 84 | ports: |
| 85 | - containerPort: 2222 |
| 86 | name: gitolite-ssh |
| 87 | protocol: TCP |
| 88 | volumeMounts: |
| 89 | - name: data |
| 90 | mountPath: /home/git/repositories |
| 91 | subPath: repositories |
| 92 | #- name: data |
| 93 | # mountPath: /home/git/projects.list |
| 94 | # subPath: projects.list |
| 95 | - name: data |
| 96 | mountPath: /home/git/.gitolite |
| 97 | subPath: .gitolite |
| 98 | - name: data |
| 99 | mountPath: /home/git/.gitolite.rc |
| 100 | subPath: .gitolite.rc |
| 101 | - name: data |
| 102 | mountPath: /home/git/.ssh |
| 103 | subPath: .ssh |
| 104 | - name: ssh |
| 105 | mountPath: /etc/ssh |
| Matthias Andreas Benkard | c756035 | 2021-09-05 12:25:13 +0200 | [diff] [blame] | 106 | volumes: |
| 107 | - name: data |
| 108 | persistentVolumeClaim: |
| 109 | claimName: git-data |
| Matthias Andreas Benkard | 8c9b613 | 2024-03-06 12:51:33 +0100 | [diff] [blame] | 110 | - name: ssh |
| 111 | persistentVolumeClaim: |
| 112 | claimName: git-ssh |
| Matthias Andreas Benkard | c756035 | 2021-09-05 12:25:13 +0200 | [diff] [blame] | 113 | - name: config |
| 114 | configMap: |
| 115 | name: git-config |
| 116 | --- |
| 117 | apiVersion: v1 |
| 118 | kind: Service |
| 119 | metadata: |
| 120 | name: git-cgit |
| 121 | namespace: mulk |
| 122 | labels: |
| 123 | k8s-app: git |
| 124 | name: git-cgit |
| 125 | spec: |
| 126 | selector: |
| 127 | k8s-app: git |
| 128 | type: ClusterIP |
| 129 | ports: |
| 130 | - name: http |
| 131 | port: 80 |
| 132 | targetPort: cgit-http |
| 133 | protocol: TCP |
| 134 | --- |
| 135 | apiVersion: v1 |
| 136 | kind: Service |
| 137 | metadata: |
| 138 | name: git-gitolite |
| 139 | namespace: mulk |
| 140 | labels: |
| 141 | k8s-app: git |
| 142 | name: git-gitolite |
| 143 | spec: |
| 144 | selector: |
| 145 | k8s-app: git |
| Matthias Andreas Benkard | 8c9b613 | 2024-03-06 12:51:33 +0100 | [diff] [blame] | 146 | type: NodePort |
| Matthias Andreas Benkard | c756035 | 2021-09-05 12:25:13 +0200 | [diff] [blame] | 147 | ports: |
| 148 | - name: ssh |
| 149 | port: 22 |
| 150 | targetPort: gitolite-ssh |
| 151 | protocol: TCP |
| 152 | --- |
| 153 | apiVersion: v1 |
| 154 | kind: PersistentVolumeClaim |
| 155 | metadata: |
| 156 | name: git-data |
| 157 | namespace: mulk |
| 158 | labels: |
| 159 | name: git-data |
| 160 | k8s-app: git |
| 161 | spec: |
| 162 | accessModes: |
| 163 | - ReadWriteOnce |
| 164 | resources: |
| 165 | requests: |
| 166 | storage: 200Gi |
| 167 | storageClassName: local-path |
| 168 | --- |
| Matthias Andreas Benkard | 8c9b613 | 2024-03-06 12:51:33 +0100 | [diff] [blame] | 169 | apiVersion: v1 |
| 170 | kind: PersistentVolumeClaim |
| 171 | metadata: |
| 172 | name: git-ssh |
| 173 | namespace: mulk |
| 174 | labels: |
| 175 | name: git-ssh |
| 176 | k8s-app: git |
| 177 | spec: |
| 178 | accessModes: |
| 179 | - ReadWriteOnce |
| 180 | resources: |
| 181 | requests: |
| 182 | storage: 50Mi |
| 183 | storageClassName: local-path |
| 184 | --- |
| Matthias Andreas Benkard | 8528b52 | 2026-11-05 10:57:03 +0100 | [diff] [blame] | 185 | # TLS certificate for the cgit IngressRoute below. It used to be created |
| 186 | # by cert-manager's ingress-shim from an nginx Ingress, which has been |
| 187 | # removed; the HTTP-01 solver still goes through Traefik's nginx-class |
| 188 | # compat provider (see the letsencrypt-prod ClusterIssuer). |
| 189 | apiVersion: cert-manager.io/v1 |
| 190 | kind: Certificate |
| Matthias Andreas Benkard | c756035 | 2021-09-05 12:25:13 +0200 | [diff] [blame] | 191 | metadata: |
| Matthias Andreas Benkard | 8528b52 | 2026-11-05 10:57:03 +0100 | [diff] [blame] | 192 | name: git-cgit-cgi-tls |
| Matthias Andreas Benkard | c756035 | 2021-09-05 12:25:13 +0200 | [diff] [blame] | 193 | namespace: mulk |
| Matthias Andreas Benkard | c756035 | 2021-09-05 12:25:13 +0200 | [diff] [blame] | 194 | spec: |
| Matthias Andreas Benkard | 8528b52 | 2026-11-05 10:57:03 +0100 | [diff] [blame] | 195 | secretName: git-cgit-cgi-tls |
| 196 | dnsNames: |
| 197 | - git.benkard.de |
| 198 | issuerRef: |
| 199 | kind: ClusterIssuer |
| 200 | name: letsencrypt-prod |
| Matthias Andreas Benkard | c756035 | 2021-09-05 12:25:13 +0200 | [diff] [blame] | 201 | --- |
| Matthias Andreas Benkard | 8528b52 | 2026-11-05 10:57:03 +0100 | [diff] [blame] | 202 | # Traefik route for cgit. Traefik's ingress-nginx provider does not |
| 203 | # support nginx snippet annotations, and it has no global per-host rate |
| Matthias Andreas Benkard | b4f91a1 | 2026-11-04 21:36:23 +0100 | [diff] [blame] | 204 | # limit, so cgit gets a native IngressRoute instead. |
| 205 | # |
| 206 | # A crawler botnet with thousands of rotating IPs and browser user agents |
| 207 | # hammers cgit; cap it at 5 r/s in total (not per client). A single router |
| 208 | # keeps the limit in one bucket (each router gets its own limiter). |
| 209 | apiVersion: traefik.io/v1alpha1 |
| 210 | kind: Middleware |
| 211 | metadata: |
| 212 | name: git-cgit-ratelimit |
| 213 | namespace: mulk |
| 214 | spec: |
| 215 | rateLimit: |
| 216 | average: 5 |
| 217 | period: 1s |
| 218 | burst: 20 |
| 219 | sourceCriterion: |
| 220 | requestHost: true |
| 221 | --- |
| 222 | # Same as the rewrite-target of the Ingress above: strip a ".git" suffix |
| 223 | # from the repository name and route everything to cgit.cgi. |
| 224 | apiVersion: traefik.io/v1alpha1 |
| 225 | kind: Middleware |
| 226 | metadata: |
| 227 | name: git-cgit-rewrite |
| 228 | namespace: mulk |
| 229 | spec: |
| 230 | replacePathRegex: |
| 231 | regex: "^/(?:(.*)[.]git(/.*)?|(.*))$" |
| Matthias Andreas Benkard | 68157fd | 2026-11-05 15:58:35 +0100 | [diff] [blame] | 232 | replacement: "/${1}${2}${3}" |
| Matthias Andreas Benkard | b4f91a1 | 2026-11-04 21:36:23 +0100 | [diff] [blame] | 233 | --- |
| 234 | apiVersion: traefik.io/v1alpha1 |
| 235 | kind: Middleware |
| 236 | metadata: |
| 237 | name: git-cgit-https-redirect |
| 238 | namespace: mulk |
| 239 | spec: |
| 240 | redirectScheme: |
| 241 | scheme: https |
| 242 | permanent: true |
| 243 | --- |
| 244 | apiVersion: traefik.io/v1alpha1 |
| 245 | kind: IngressRoute |
| 246 | metadata: |
| 247 | name: git-cgit-cgi |
| 248 | namespace: mulk |
| 249 | spec: |
| 250 | entryPoints: |
| 251 | - websecure |
| 252 | routes: |
| 253 | - kind: Rule |
| 254 | match: Host(`git.benkard.de`) |
| 255 | middlewares: |
| 256 | - name: git-cgit-ratelimit |
| 257 | - name: git-cgit-rewrite |
| 258 | services: |
| 259 | - name: git-cgit |
| 260 | port: 80 |
| 261 | tls: |
| 262 | secretName: git-cgit-cgi-tls |
| 263 | --- |
| 264 | apiVersion: traefik.io/v1alpha1 |
| 265 | kind: IngressRoute |
| 266 | metadata: |
| 267 | name: git-cgit-cgi-http |
| 268 | namespace: mulk |
| 269 | spec: |
| 270 | entryPoints: |
| 271 | - web |
| 272 | routes: |
| 273 | - kind: Rule |
| 274 | match: Host(`git.benkard.de`) |
| 275 | middlewares: |
| 276 | - name: git-cgit-https-redirect |
| 277 | services: |
| 278 | - name: git-cgit |
| 279 | port: 80 |
| 280 | --- |
| Matthias Andreas Benkard | c756035 | 2021-09-05 12:25:13 +0200 | [diff] [blame] | 281 | apiVersion: networking.k8s.io/v1 |
| 282 | kind: Ingress |
| 283 | metadata: |
| 284 | name: git-cgit-assets |
| 285 | namespace: mulk |
| 286 | annotations: |
| 287 | cert-manager.io/cluster-issuer: letsencrypt-prod |
| 288 | kubernetes.io/ingress.class: nginx |
| 289 | nginx.ingress.kubernetes.io/rewrite-target: /cgit/$1 |
| 290 | spec: |
| 291 | rules: |
| 292 | - host: static.git.benkard.de |
| 293 | http: |
| 294 | paths: |
| 295 | - backend: |
| 296 | service: |
| 297 | name: git-cgit |
| 298 | port: |
| 299 | number: 80 |
| 300 | path: /(.*) |
| 301 | pathType: ImplementationSpecific |
| 302 | tls: |
| 303 | - hosts: |
| 304 | - static.git.benkard.de |
| 305 | secretName: git-cgit-assets-tls |
| 306 | --- |
| 307 | apiVersion: v1 |
| 308 | kind: ConfigMap |
| 309 | metadata: |
| 310 | name: git-config |
| 311 | namespace: mulk |
| 312 | data: |
| 313 | cgitrc: |- |
| 314 | css=https://static.git.benkard.de/cgit.css |
| 315 | logo=https://static.git.benkard.de/cgit.png |
| 316 | |
| 317 | remove-suffix=1 |
| 318 | enable-commit-graph=1 |
| 319 | enable-index-links=1 |
| 320 | enable-log-filecount=1 |
| 321 | enable-log-linecount=1 |
| 322 | enable-git-config=1 |
| 323 | case-sensitive-sort=0 |
| 324 | |
| 325 | virtual-root=https://git.benkard.de/ |
| 326 | |
| 327 | #cache-size=10000 |
| 328 | #cache-root=/var/cache/cgit |
| 329 | |
| 330 | # needs Pygments |
| 331 | #source-filter=/usr/lib/cgit/filters/syntax-highlighting.py |
| 332 | |
| 333 | about-filter=/usr/lib/cgit/filters/about-formatting.sh |
| 334 | |
| 335 | clone-url=https://git.benkard.de/$CGIT_REPO_URL |
| 336 | |
| 337 | readme=:README.md |
| 338 | readme=:README.markdown |
| 339 | readme=:README.html |
| 340 | readme=:README.txt |
| 341 | readme=:README |
| 342 | |
| 343 | project-list=/home/git/projects.list |
| 344 | scan-path=/home/git/repositories/ |
| 345 | |
| 346 | # |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 347 | |
| 348 | --- |
| 349 | |
| 350 | apiVersion: batch/v1 |
| 351 | kind: CronJob |
| 352 | |
| 353 | metadata: |
| 354 | name: git-github-replication |
| 355 | namespace: mulk |
| 356 | labels: &labels |
| 357 | k8s-app: git |
| 358 | |
| 359 | spec: |
| 360 | schedule: "*/120 * * * *" |
| Matthias Andreas Benkard | cbdcd90 | 2022-12-27 15:31:15 +0100 | [diff] [blame] | 361 | concurrencyPolicy: Forbid |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 362 | |
| 363 | jobTemplate: |
| 364 | |
| 365 | spec: |
| 366 | ttlSecondsAfterFinished: 3600 |
| 367 | |
| 368 | template: |
| 369 | metadata: |
| 370 | name: git-github-replication |
| 371 | labels: *labels |
| 372 | |
| 373 | spec: |
| 374 | restartPolicy: OnFailure |
| 375 | |
| 376 | volumes: |
| 377 | - name: github-secrets |
| 378 | secret: |
| 379 | secretName: github-secrets |
| Matthias Andreas Benkard | 11298da | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 380 | defaultMode: 0444 |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 381 | - name: data |
| 382 | persistentVolumeClaim: |
| 383 | claimName: git-data |
| Matthias Andreas Benkard | 8c9b613 | 2024-03-06 12:51:33 +0100 | [diff] [blame] | 384 | - name: etc |
| 385 | emptyDir: {} |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 386 | |
| Matthias Andreas Benkard | 8c9b613 | 2024-03-06 12:51:33 +0100 | [diff] [blame] | 387 | initContainers: |
| 388 | - name: init |
| 389 | image: docker.io/library/buildpack-deps:scm |
| Matthias Andreas Benkard | 11298da | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 390 | securityContext: |
| 391 | runAsUser: 100 |
| 392 | runAsGroup: 101 |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 393 | command: |
| 394 | - bash |
| 395 | - -c |
| 396 | - | |
| Matthias Andreas Benkard | 8c9b613 | 2024-03-06 12:51:33 +0100 | [diff] [blame] | 397 | echo git:x:106:107:Git:/home/git:/bin/sh >/etc/passwd |
| 398 | volumeMounts: |
| 399 | - name: etc |
| 400 | mountPath: /etc |
| 401 | |
| 402 | containers: |
| 403 | - name: main |
| 404 | image: docker.io/library/buildpack-deps:scm |
| 405 | securityContext: |
| 406 | runAsUser: 106 |
| 407 | runAsGroup: 107 |
| 408 | command: |
| 409 | - bash |
| 410 | - -c |
| 411 | - | |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 412 | for x in \ |
| Matthias Andreas Benkard | 7f8981a | 2026-11-04 11:41:17 +0100 | [diff] [blame] | 413 | kartipalist |
| 414 | do |
| 415 | if ! test -e "/git/repositories/kellertomaten/$x.git"; then |
| 416 | printf "SKIP %s / %s\n" kellertomaten "$x" |
| 417 | continue |
| 418 | fi |
| 419 | |
| 420 | cd "/git/repositories/kellertomaten/$x.git" |
| 421 | |
| 422 | for branch in master main |
| 423 | do |
| 424 | printf "COPY %s / %s / %s\n" kellertomaten "$x" "$branch" |
| 425 | git fetch "ssh://git@gitlab.benkard.de:32222/kellertomaten/${x}.git" "$branch:$branch" && \ |
| 426 | ( git push "ssh://mulk@gerrit.benkard.de:29418/${x}.git" "$branch"; \ |
| 427 | git push "git@github.com:kellertomaten/${x}.git" "$branch" ) |
| 428 | done |
| 429 | done |
| 430 | |
| 431 | for x in \ |
| Matthias Andreas Benkard | 06e9d79 | 2024-03-06 12:49:24 +0100 | [diff] [blame] | 432 | .github \ |
| 433 | aendggner \ |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 434 | aquifer \ |
| 435 | benki \ |
| 436 | cellspp \ |
| 437 | cl-json-template \ |
| 438 | cl-mulkutils \ |
| 439 | cl-protocols \ |
| 440 | cljssss-g \ |
| Matthias Andreas Benkard | 06e9d79 | 2024-03-06 12:49:24 +0100 | [diff] [blame] | 441 | demos \ |
| Matthias Andreas Benkard | 7f8981a | 2026-11-04 11:41:17 +0100 | [diff] [blame] | 442 | dose \ |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 443 | fibers \ |
| 444 | hellonet \ |
| Matthias Andreas Benkard | 06e9d79 | 2024-03-06 12:49:24 +0100 | [diff] [blame] | 445 | hello-world-ng \ |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 446 | instadump \ |
| Matthias Andreas Benkard | 11298da | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 447 | jgvariant \ |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 448 | json-template-r6rs \ |
| 449 | json-template-racket \ |
| 450 | json-template-typed-racket \ |
| Matthias Andreas Benkard | 06e9d79 | 2024-03-06 12:49:24 +0100 | [diff] [blame] | 451 | kubeia \ |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 452 | logikorr \ |
| Matthias Andreas Benkard | 7f8981a | 2026-11-04 11:41:17 +0100 | [diff] [blame] | 453 | mulkbav \ |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 454 | mulkcms \ |
| Matthias Andreas Benkard | 11298da | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 455 | mulkcms2 \ |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 456 | mulkjournal \ |
| 457 | mulklib \ |
| Matthias Andreas Benkard | 11298da | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 458 | mulkontainers \ |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 459 | mulkrypt-for-racket \ |
| 460 | mulkyid \ |
| 461 | objective-cl \ |
| Matthias Andreas Benkard | 11298da | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 462 | quarkus-googlecloud-jsonlogging \ |
| Matthias Andreas Benkard | 06e9d79 | 2024-03-06 12:49:24 +0100 | [diff] [blame] | 463 | renovate-config \ |
| 464 | rust-samples \ |
| 465 | rust-tutorial \ |
| 466 | sb-eval2 \ |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 467 | toilet |
| 468 | do |
| Matthias Andreas Benkard | 06e9d79 | 2024-03-06 12:49:24 +0100 | [diff] [blame] | 469 | if ! test -e "/git/repositories/mulk/$x.git"; then |
| Matthias Andreas Benkard | 7f8981a | 2026-11-04 11:41:17 +0100 | [diff] [blame] | 470 | printf "SKIP %s / %s\n" mulk "$x" |
| Matthias Andreas Benkard | 06e9d79 | 2024-03-06 12:49:24 +0100 | [diff] [blame] | 471 | continue |
| 472 | fi |
| 473 | |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 474 | cd "/git/repositories/mulk/$x.git" |
| Matthias Andreas Benkard | e96ddfb | 2024-03-06 12:50:00 +0100 | [diff] [blame] | 475 | |
| 476 | for branch in master main |
| 477 | do |
| Matthias Andreas Benkard | 7f8981a | 2026-11-04 11:41:17 +0100 | [diff] [blame] | 478 | printf "COPY %s / %s / %s\n" mulk "$x" "$branch" |
| Matthias Andreas Benkard | e96ddfb | 2024-03-06 12:50:00 +0100 | [diff] [blame] | 479 | git fetch "https://gitlab.benkard.de/mulk/${x}.git" "$branch:$branch" && \ |
| 480 | ( git push "ssh://mulk@gerrit.benkard.de:29418/${x}.git" "$branch"; \ |
| 481 | git push "git@github.com:benkard/${x}.git" "$branch" ) |
| 482 | done |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 483 | done |
| Matthias Andreas Benkard | 7f8981a | 2026-11-04 11:41:17 +0100 | [diff] [blame] | 484 | |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 485 | true |
| Matthias Andreas Benkard | 11298da | 2023-04-02 18:27:17 +0200 | [diff] [blame] | 486 | env: |
| 487 | - name: HOME |
| Matthias Andreas Benkard | 8c9b613 | 2024-03-06 12:51:33 +0100 | [diff] [blame] | 488 | value: /home/git |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 489 | resources: |
| 490 | limits: |
| 491 | memory: 100Mi |
| 492 | requests: |
| 493 | cpu: 20m |
| 494 | memory: 100Mi |
| 495 | volumeMounts: |
| 496 | - name: github-secrets |
| Matthias Andreas Benkard | 8c9b613 | 2024-03-06 12:51:33 +0100 | [diff] [blame] | 497 | mountPath: /home/git/.ssh |
| Matthias Andreas Benkard | 7d78f7f | 2021-12-28 17:44:20 +0100 | [diff] [blame] | 498 | readOnly: true |
| 499 | - name: data |
| 500 | mountPath: /git |
| Matthias Andreas Benkard | 8c9b613 | 2024-03-06 12:51:33 +0100 | [diff] [blame] | 501 | - name: etc |
| 502 | subPath: passwd |
| 503 | mountPath: /etc/passwd |