Skip to content

Commit

Permalink
ci: Adjust CI Build for Doc-Only PRs validations with adjustments to …
Browse files Browse the repository at this point in the history
…be more directory based
  • Loading branch information
agneszitte committed Apr 2, 2024
1 parent 44e5d21 commit 1aef51e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
12 changes: 0 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
- legacy/*
- feature/*

paths:
include:
- '/'
exclude:
- .github/

pr:
branches:
include:
Expand All @@ -22,12 +16,6 @@ pr:
- legacy/*
- feature/*

paths:
include:
- '/'
exclude:
- .github/

variables:
# Path where packages (nuget or app packages) will be copied to.
PackageOutputPath: $(Build.ArtifactStagingDirectory)
Expand Down
7 changes: 4 additions & 3 deletions build/stage-determine-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
# Normalize the target branch name for PR builds or default to 'master' for push builds
$targetBranchName = $isPR ? $prTargetBranch -replace 'refs/heads/', '' : "master"
Write-Host "Build context determined: $(if ($isPR) { 'Pull Request targeting ' + $targetBranchName } else { 'Push' })"
# Fetch the target or default base branch and determine the merge base
Expand All @@ -36,7 +35,9 @@ jobs:
}
foreach ($file in $changedFiles -split "`n") {
if ($file.EndsWith(".md") -or $file -like "*/toc.yml") {
$isDoc = $file.StartsWith("doc/") -or $file -match "^.*/?[^/]*\.md$" -or $file.StartsWith(".github/")
if ($isDoc) {
$docFiles++
} else {
$nonDocFiles++
Expand Down Expand Up @@ -67,4 +68,4 @@ jobs:
Write-Host "##vso[task.setvariable variable=docsOnly;isOutput=true]$docsOnly"
Write-Host "##vso[task.setvariable variable=nonDocsOnly;isOutput=true]$nonDocsOnly"
Write-Host "##vso[task.setvariable variable=mixedChanges;isOutput=true]$mixedChanges"
name: DetermineChanges
name: DetermineChanges

0 comments on commit 1aef51e

Please sign in to comment.