@@ -17,6 +17,27 @@ trigger:
1717 branches :
1818 include :
1919 - main
20+ pr :
21+ branches :
22+ include :
23+ - main
24+ paths :
25+ include :
26+ - package.json
27+ - package-lock.json
28+ - scripts/buildJdtlsExt.js
29+ - jdtls.ext/pom.xml
30+ - jdtls.ext/**/pom.xml
31+ - jdtls.ext/**/META-INF/MANIFEST.MF
32+ - jdtls.ext/com.microsoft.jdtls.ext.target/com.microsoft.jdtls.ext.tp.target
33+ - jdtls.ext/.mvn/wrapper/maven-wrapper.properties
34+ - jdtls.ext/mvnw
35+ - jdtls.ext/mvnw.cmd
36+ - .azure-pipelines/ci.yml
37+ - .azure-pipelines/npm-cfs.yml
38+ - .azure-pipelines/npm-cfs-variables.yml
39+ - .azure-pipelines/maven-cfs-variables.yml
40+ - .azure-pipelines/cfs-settings.xml
2041extends :
2142 template : v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
2243 parameters :
@@ -34,8 +55,35 @@ extends:
3455 stages :
3556 - stage : Build
3657 jobs :
58+ - job : CFSValidation
59+ displayName : Validate dependencies from CFS
60+ condition : eq(variables['Build.Reason'], 'PullRequest')
61+ steps :
62+ - checkout : self
63+ fetchTags : false
64+ - task : JavaToolInstaller@0
65+ displayName : Use Java 21
66+ inputs :
67+ versionSpec : " 21"
68+ jdkArchitectureOption : x64
69+ jdkSourceOption : PreInstalled
70+ - task : NodeTool@0
71+ displayName : Use Node 20.x
72+ inputs :
73+ versionSpec : 20.x
74+ - template : /.azure-pipelines/npm-cfs.yml@self
75+ - script : npm ci --ignore-scripts --prefer-online --cache "$(Agent.TempDirectory)/npm-cache"
76+ displayName : Validate npm dependencies from CFS
77+ - script : npm run build-server
78+ displayName : Validate Maven dependencies from CFS
79+ env :
80+ SYSTEM_ACCESSTOKEN : $(System.AccessToken)
81+ MVNW_PASSWORD : $(System.AccessToken)
82+ MAVEN_USER_HOME : $(Agent.TempDirectory)/m2
83+ MAVEN_ARGS : -s $(Build.SourcesDirectory)/.azure-pipelines/cfs-settings.xml -Dmaven.repo.local=$(Agent.TempDirectory)/m2/repository -U
3784 - job : Job_1
3885 displayName : CI
86+ condition : ne(variables['Build.Reason'], 'PullRequest')
3987 templateContext :
4088 outputs :
4189 - output : pipelineArtifact
0 commit comments