|
| 1 | +trigger: none |
| 2 | + |
| 3 | +schedules: |
| 4 | +- cron: "0 10 * * *" # 10 AM UTC |
| 5 | + displayName: OneFuzz deployment nightly run |
| 6 | + branches: |
| 7 | + include: |
| 8 | + - main |
| 9 | + |
| 10 | +variables: |
| 11 | + - template: ../variables.yml |
| 12 | + - name: fuzzerProject |
| 13 | + value: $(Build.SourcesDirectory)/src/libraries/Fuzzing/DotnetFuzzing |
| 14 | + - name: dotnetPath |
| 15 | + value: $(Build.SourcesDirectory)/.dotnet/dotnet |
| 16 | + |
| 17 | +extends: |
| 18 | + template: /eng/pipelines/common/templates/pipeline-with-resources.yml |
| 19 | + parameters: |
| 20 | + stages: |
| 21 | + - stage: Build |
| 22 | + jobs: |
| 23 | + - job: windows |
| 24 | + displayName: Build & Deploy to OneFuzz |
| 25 | + timeoutInMinutes: 120 |
| 26 | + pool: |
| 27 | + name: $(DncEngInternalBuildPool) |
| 28 | + demands: ImageOverride -equals windows.vs2022.amd64 |
| 29 | + |
| 30 | + steps: |
| 31 | + - checkout: self |
| 32 | + clean: true |
| 33 | + fetchDepth: 1 |
| 34 | + lfs: false |
| 35 | + |
| 36 | + - powershell: | |
| 37 | + cd $(Build.SourcesDirectory) |
| 38 | + ./build.cmd clr+libs+packs+host -rc Checked -c Debug |
| 39 | + displayName: Build runtime (checked + debug) |
| 40 | +
|
| 41 | + - powershell: | |
| 42 | + cd $(fuzzerProject) |
| 43 | + $(dotnetPath) publish -o publish |
| 44 | + displayName: Build Fuzzing targets |
| 45 | +
|
| 46 | + - powershell: | |
| 47 | + cd $(fuzzerProject) |
| 48 | + $(dotnetPath) tool install --tool-path . SharpFuzz.CommandLine |
| 49 | + displayName: Install SharpFuzz.CommandLine |
| 50 | +
|
| 51 | + - powershell: | |
| 52 | + cd $(fuzzerProject) |
| 53 | + publish/DotnetFuzzing.exe prepare-onefuzz deployment |
| 54 | + displayName: Prepare OneFuzz deployment |
| 55 | +
|
| 56 | +# OneFuzz can't currently handle a single deployment where multiple jobs share similar assemblies/pdbs. |
| 57 | +# As a workaround, we emit a task for every fuzzing target individually. |
| 58 | +# https://fuzzfest.visualstudio.com/Onefuzz/_workitems/edit/191504/ is tracking this issue. |
| 59 | +# - task: onefuzz-task@0 |
| 60 | +# inputs: |
| 61 | +# onefuzzOSes: 'Windows' |
| 62 | +# env: |
| 63 | +# onefuzzDropDirectory: $(fuzzerProject)/deployment |
| 64 | +# SYSTEM_ACCESSTOKEN: $(System.AccessToken) |
| 65 | +# displayName: Send to OneFuzz |
| 66 | + |
| 67 | +# ONEFUZZ_TASK_WORKAROUND_START |
| 68 | + - task: onefuzz-task@0 |
| 69 | + inputs: |
| 70 | + onefuzzOSes: 'Windows' |
| 71 | + env: |
| 72 | + onefuzzDropDirectory: $(fuzzerProject)/deployment/HttpHeadersFuzzer |
| 73 | + SYSTEM_ACCESSTOKEN: $(System.AccessToken) |
| 74 | + displayName: Send HttpHeadersFuzzer to OneFuzz |
| 75 | + |
| 76 | + - task: onefuzz-task@0 |
| 77 | + inputs: |
| 78 | + onefuzzOSes: 'Windows' |
| 79 | + env: |
| 80 | + onefuzzDropDirectory: $(fuzzerProject)/deployment/JsonDocumentFuzzer |
| 81 | + SYSTEM_ACCESSTOKEN: $(System.AccessToken) |
| 82 | + displayName: Send JsonDocumentFuzzer to OneFuzz |
| 83 | + |
| 84 | + - task: onefuzz-task@0 |
| 85 | + inputs: |
| 86 | + onefuzzOSes: 'Windows' |
| 87 | + env: |
| 88 | + onefuzzDropDirectory: $(fuzzerProject)/deployment/SearchValuesByteCharFuzzer |
| 89 | + SYSTEM_ACCESSTOKEN: $(System.AccessToken) |
| 90 | + displayName: Send SearchValuesByteCharFuzzer to OneFuzz |
| 91 | + |
| 92 | + - task: onefuzz-task@0 |
| 93 | + inputs: |
| 94 | + onefuzzOSes: 'Windows' |
| 95 | + env: |
| 96 | + onefuzzDropDirectory: $(fuzzerProject)/deployment/SearchValuesStringFuzzer |
| 97 | + SYSTEM_ACCESSTOKEN: $(System.AccessToken) |
| 98 | + displayName: Send SearchValuesStringFuzzer to OneFuzz |
| 99 | + |
| 100 | + - task: onefuzz-task@0 |
| 101 | + inputs: |
| 102 | + onefuzzOSes: 'Windows' |
| 103 | + env: |
| 104 | + onefuzzDropDirectory: $(fuzzerProject)/deployment/UTF8Fuzzer |
| 105 | + SYSTEM_ACCESSTOKEN: $(System.AccessToken) |
| 106 | + displayName: Send UTF8Fuzzer to OneFuzz |
| 107 | +# ONEFUZZ_TASK_WORKAROUND_END |
0 commit comments