Skip to content

Commit 930a36d

Browse files
committed
Add example step for ending build tracing
1 parent 47a543e commit 930a36d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docs/codeql/codeql-cli/creating-codeql-databases.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,20 @@ The following example shows how you could use indirect build tracing in an Azure
324324
clean: True
325325
displayName: Visual Studio Build
326326

327-
# End build tracing.
327+
# Read and set the generated environment variables to end build tracing. This is done in PowerShell in this example.
328+
- task: PowerShell@1
329+
displayName: Set CodeQL environment variables
330+
inputs:
331+
targetType: inline
332+
script: >
333+
$json = Get-Content $(System.DefaultWorkingDirectory)/db/temp/tracingEnvironment/end-tracing.json | ConvertFrom-Json
334+
$json.PSObject.Properties | ForEach-Object {
335+
$template = "##vso[task.setvariable variable="
336+
$template += $_.Name
337+
$template += "]"
338+
$template += $_.Value
339+
echo "$template"
340+
}
328341

329342
- task: CmdLine@2
330343
displayName: Finalize CodeQL database

0 commit comments

Comments
 (0)