blob: 0f49e432fef010a8326d0b8b82bccda07ab1a690 (
plain)
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
|
# Copyright 2025 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: fetch-kernels-workflow-template
spec:
entrypoint: main
podMetadata:
labels:
tier: workflow
podGC:
strategy: OnPodCompletion
deleteDelayDuration: 12h
ttlStrategy:
secondsAfterCompletion: 86400
serviceAccountName: argo-executor-ksa
templates:
- name: main
parallelism: 1
steps:
- - name: query-trees
template: query-trees-template
- - name: iterate-trees
template: process-tree
arguments:
parameters:
- name: tree
value: "{{item}}"
withParam: "{{=jsonpath(steps['query-trees'].outputs.result, '$.trees')}}"
continueOn:
failed: true
- name: query-trees-template
http:
url: "http://controller-service:8080/trees"
method: "GET"
- name: process-tree
inputs:
parameters:
- name: tree
volumes:
- name: git-repo
persistentVolumeClaim:
claimName: base-kernel-repo-pv-claim
container:
image: alpine/git:latest
imagePullPolicy: IfNotPresent
volumeMounts:
- name: git-repo
mountPath: /repo.git
resources:
requests:
cpu: 4
memory: 8G
limits:
cpu: 8
memory: 16G
command:
- "/bin/sh"
- "-c"
- |
cd /repo.git
if [ ! -d "refs" ]; then
git init --bare
fi
NAME="{{=jsonpath(inputs.parameters.tree, '$.name')}}"
REPO="{{=jsonpath(inputs.parameters.tree, '$.URL')}}"
BRANCH="{{=jsonpath(inputs.parameters.tree, '$.branch')}}"
echo "${NAME}: ${REPO}/${BRANCH}"
git remote remove ${NAME} || true
git remote add ${NAME} ${REPO}
git fetch ${NAME} ${BRANCH} --tags "+refs/heads/*:refs/heads/${NAME}/*" "+refs/tags/*:refs/tags/${NAME}/*"
git log -1 --format="%h %an %ad %s" ${NAME}/${BRANCH}
|