Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions eng/ci/host.coldstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ resources:
type: git
name: engineering
ref: refs/tags/release
- repository: functions-release
type: git
name: internal/functions-release
ref: refs/heads/main
Comment thread
Francisco-Gamino marked this conversation as resolved.

variables:
- template: /eng/ci/templates/variables/coldstart.yml@self
Expand All @@ -79,6 +83,12 @@ variables:
extends:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es
parameters:
# Exclude functions-release from SDL source analysis. It only contains release
# pipeline configs and JIT trace data files, not source code built by this pipeline.
sdl:
sourceRepositoriesToScan:
exclude:
- repository: functions-release
pool:
name: 1es-pool-azfunc-benchmarking
image: 1es-windows-2022-benchmark-runner-vanilla
Expand Down
54 changes: 54 additions & 0 deletions eng/ci/templates/official/jobs/run-coldstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,60 @@ jobs:

steps:

# Explicit self checkout is required when multiple repos are checked out.
# Using path: s ensures Build.SourcesDirectory is not changed by multi-checkout.
- checkout: self
path: s

# Checkout the functions-release repo to get the latest out-of-proc JIT trace files.
- checkout: functions-release
fetchDepth: 1
path: functions-release

# Copy the JIT trace files into PreJIT/ so they are included in the host publish output.
# The files have been removed from the host repo; this step is the sole source of truth.
- pwsh: |
$jitTracePath = "$(jitTraceRepoPath)"
$sourceDir = Join-Path "$(Pipeline.Workspace)" "functions-release" $jitTracePath
$targetDir = Join-Path "$(Build.SourcesDirectory)" "src/WebJobs.Script.WebHost/PreJIT"

if (-not (Test-Path $targetDir)) {
New-Item -ItemType Directory -Path $targetDir -Force | Out-Null
}

$files = @("coldstart.jittrace", "linux.coldstart.jittrace")
$failed = $false

foreach ($file in $files) {
$src = Join-Path $sourceDir $file
$dest = Join-Path $targetDir $file
if (Test-Path $src) {
Copy-Item $src -Destination $dest -Force
$size = (Get-Item $dest).Length
Write-Host "Copied $file ($size bytes) to $dest"
} else {
Write-Host "##vso[task.logissue type=error]JIT trace file not found: $src"
$failed = $true
}
}

if ($failed) {
Write-Host "##vso[task.complete result=Failed;]One or more JIT trace files could not be found."
exit 1
}

# Display release notes if present
$releaseNotesPath = Join-Path $sourceDir "release_notes.md"
if (Test-Path $releaseNotesPath) {
Write-Host "Release notes ($releaseNotesPath):"
foreach ($line in Get-Content $releaseNotesPath) {
Write-Host "| $line"
}
} else {
Write-Host "No release notes found at: $releaseNotesPath"
}
displayName: Copy JIT trace files from functions-release

# # For JIT trace generation, ensure the app is configured with a storage account so the authentication flow can be executed end-to-end.
- ${{ if and(eq(parameters.createJitTrace, true), eq(parameters.instanceId, '1')) }}:
- task: AzureKeyVault@2
Expand Down
3 changes: 3 additions & 0 deletions eng/ci/templates/variables/coldstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ variables:
# Reduced instance count for JIT trace generation to minimize YAML size
- name: jitReleaseInstances
value: "1,2,3"
# Path to the out-of-proc JIT trace files in the functions-release repo
- name: jitTraceRepoPath
value: "artifacts/Host/JitTrace/dev"
Loading
Loading