github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/syz-cluster/pkg/workflow/template.yaml (about) 1 # Copyright 2025 syzkaller project authors. All rights reserved. 2 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 apiVersion: argoproj.io/v1alpha1 5 kind: Workflow 6 metadata: 7 generateName: series-workflow 8 spec: 9 entrypoint: main 10 podGC: 11 # Keep pods for 12 hours after completion. 12 strategy: OnPodCompletion 13 deleteDelayDuration: 12h 14 ttlStrategy: 15 # Keep finihed workflows for 12 hours after completion. 16 secondsAfterCompletion: 43200 17 podMetadata: 18 labels: 19 tier: workflow 20 arguments: 21 parameters: 22 - name: session-id 23 value: "some-session-id" 24 # TODO: there seems to be no way to pass env variables into the GC workflow. 25 # Set ARGO_ARTIFACT_GC_ENABLED=0 for the local setup? 26 # artifactGC: 27 # strategy: OnWorkflowCompletion 28 templates: 29 - name: main 30 # Note that failFast and parallelism only affect this template's steps. 31 # Don't schedule new steps if any of the previous steps failed. 32 failFast: true 33 parallelism: 2 34 steps: 35 - - name: run-triage 36 templateRef: 37 name: triage-step-template 38 template: triage-step 39 - - name: abort-on-skip-outcome 40 template: exit-workflow 41 when: "{{=jsonpath(steps['run-triage'].outputs.parameters.result, '$.skip_reason') != ''}}" 42 - - name: run-process-fuzz 43 template: process-fuzz 44 arguments: 45 parameters: 46 - name: element 47 value: "{{item}}" 48 withParam: "{{=jsonpath(steps['run-triage'].outputs.parameters.result, '$.fuzz')}}" 49 continueOn: 50 failed: true 51 - name: process-fuzz 52 inputs: 53 parameters: 54 - name: element 55 steps: 56 - - name: save-base-req 57 template: convert-artifact 58 arguments: 59 parameters: 60 - name: data 61 value: "{{=jsonpath(inputs.parameters.element, '$.base')}}" 62 - - name: base-build 63 templateRef: 64 name: build-step-template 65 template: build-step 66 arguments: 67 parameters: 68 - name: test-name 69 value: "[{{=jsonpath(inputs.parameters.element, '$.track')}}] Build Base" 70 - name: session-id 71 value: "{{workflow.parameters.session-id}}" 72 artifacts: 73 - name: request 74 from: "{{steps.save-base-req.outputs.artifacts.artifact}}" 75 - - name: abort-if-base-build-failed 76 template: exit-workflow 77 when: "{{=jsonpath(steps['base-build'].outputs.parameters.result, '$.success') == false}}" 78 - - name: save-patched-req 79 template: convert-artifact 80 arguments: 81 parameters: 82 - name: data 83 value: "{{=jsonpath(inputs.parameters.element, '$.patched')}}" 84 - - name: boot-test-base 85 templateRef: 86 name: boot-step-template 87 template: boot-step 88 arguments: 89 artifacts: 90 - name: kernel 91 from: "{{steps.base-build.outputs.artifacts.kernel}}" 92 parameters: 93 - name: config 94 value: "{{=jsonpath(inputs.parameters.element, '$.config')}}" 95 - name: base-build-id 96 value: "{{=jsonpath(steps['base-build'].outputs.parameters.result, '$.build_id')}}" 97 - name: test-name 98 value: "[{{=jsonpath(inputs.parameters.element, '$.track')}}] Boot test: Base" 99 - - name: abort-if-base-boot-failed 100 template: exit-workflow 101 when: "{{=jsonpath(steps['boot-test-base'].outputs.parameters.result, '$.success') == false}}" 102 - - name: patched-build 103 templateRef: 104 name: build-step-template 105 template: build-step 106 arguments: 107 parameters: 108 - name: test-name 109 value: "[{{=jsonpath(inputs.parameters.element, '$.track')}}] Build Patched" 110 - name: findings 111 value: "true" 112 - name: session-id 113 value: "{{workflow.parameters.session-id}}" 114 artifacts: 115 - name: request 116 from: "{{steps.save-patched-req.outputs.artifacts.artifact}}" 117 - - name: abort-if-patched-build-failed 118 template: exit-workflow 119 when: "{{=jsonpath(steps['patched-build'].outputs.parameters.result, '$.success') == false}}" 120 - - name: boot-test-patched 121 templateRef: 122 name: boot-step-template 123 template: boot-step 124 arguments: 125 artifacts: 126 - name: kernel 127 from: "{{steps.patched-build.outputs.artifacts.kernel}}" 128 parameters: 129 - name: config 130 value: "{{=jsonpath(inputs.parameters.element, '$.config')}}" 131 - name: patched-build-id 132 value: "{{=jsonpath(steps['patched-build'].outputs.parameters.result, '$.build_id')}}" 133 - name: report-findings 134 value: "true" 135 - name: test-name 136 value: "[{{=jsonpath(inputs.parameters.element, '$.track')}}] Boot test: Patched" 137 - - name: abort-if-patched-boot-failed 138 template: exit-workflow 139 when: "{{=jsonpath(steps['boot-test-patched'].outputs.parameters.result, '$.success') == false}}" 140 - - name: save-fuzz-config 141 template: convert-artifact 142 arguments: 143 parameters: 144 - name: data 145 value: "{{=jsonpath(inputs.parameters.element, '$')}}" 146 - - name: fuzz 147 templateRef: 148 name: fuzz-step-template 149 template: fuzz-step 150 arguments: 151 parameters: 152 - name: patched-build-id 153 value: "{{=jsonpath(steps['patched-build'].outputs.parameters.result, '$.build_id')}}" 154 - name: base-build-id 155 value: "{{=jsonpath(steps['base-build'].outputs.parameters.result, '$.build_id')}}" 156 artifacts: 157 - name: base-kernel 158 from: "{{steps.base-build.outputs.artifacts.kernel}}" 159 - name: patched-kernel 160 from: "{{steps.patched-build.outputs.artifacts.kernel}}" 161 - name: config 162 from: "{{steps.save-fuzz-config.outputs.artifacts.artifact}}" 163 - name: convert-artifact 164 inputs: 165 parameters: 166 - name: data 167 outputs: 168 artifacts: 169 - name: artifact 170 path: /tmp/artifact 171 container: 172 image: alpine:latest 173 command: [sh, -c] 174 args: ["echo '{{inputs.parameters.data}}' > /tmp/artifact"] 175 - name: exit-workflow 176 inputs: 177 parameters: 178 - name: code 179 value: 1 180 container: 181 image: alpine:latest 182 command: ['/bin/sh', '-c'] 183 args: ["exit {{inputs.parameters.code}}"]