Skip to content

Commit fb25a29

Browse files
authored
build: limit PR validation to CFS restores (#1698)
1 parent 5735c4b commit fb25a29

2 files changed

Lines changed: 25 additions & 21 deletions

File tree

.azure-pipelines/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ trigger:
1616
branches:
1717
include:
1818
- main
19+
pr:
20+
branches:
21+
include:
22+
- main
23+
paths:
24+
include:
25+
- package.json
26+
- package-lock.json
27+
- .azure-pipelines/ci.yml
28+
- .azure-pipelines/npm-cfs.yml
29+
- .azure-pipelines/npm-cfs-variables.yml
1930
extends:
2031
template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
2132
parameters:
@@ -33,8 +44,22 @@ extends:
3344
stages:
3445
- stage: Build
3546
jobs:
47+
- job: CFSValidation
48+
displayName: Validate dependencies from CFS
49+
condition: eq(variables['Build.Reason'], 'PullRequest')
50+
steps:
51+
- checkout: self
52+
fetchTags: false
53+
- task: NodeTool@0
54+
displayName: Use Node 20.x
55+
inputs:
56+
versionSpec: 20.x
57+
- template: /.azure-pipelines/npm-cfs.yml@self
58+
- script: npm ci --ignore-scripts --prefer-online --cache "$(Agent.TempDirectory)/npm-cache"
59+
displayName: Validate npm dependencies from CFS
3660
- job: Job_1
3761
displayName: VSCode-Java-Debug-CI
62+
condition: ne(variables['Build.Reason'], 'PullRequest')
3863
templateContext:
3964
outputs:
4065
- output: pipelineArtifact

.github/dependabot.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,6 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: "npm" # See documentation for possible values
9-
directory: "/" # Location of package manifests
10-
schedule:
11-
interval: "daily"
12-
allow:
13-
- dependency-type: "production"
14-
- dependency-type: "development"
15-
update-types:
16-
- "version-update:semver-minor"
17-
- "version-update:semver-patch"
18-
commit-message:
19-
prefix: "chore(deps)"
20-
prefix-development: "chore(dev-deps)"
21-
# CI restores packages from the Central Feed Service, which withholds
22-
# upstream versions until they are roughly a week old (measured at ~6.8
23-
# days; both the packument entry and the tarball return 404 before then).
24-
# Dependabot's built-in cooldown is only 3 days, so bumps otherwise land in
25-
# a window where the feed 404s and the build fails. 10 days leaves margin
26-
# in case the feed's ingestion lag drifts.
27-
cooldown:
28-
default-days: 10
298
- package-ecosystem: "github-actions"
309
directory: "/"
3110
groups:

0 commit comments

Comments
 (0)