Skip to content

Commit 1c3dd93

Browse files
fix: route Gradle deps through CFS upstream Azure Artifacts feed
Generates an init.gradle script that redirects all Gradle repositories (both dependencies and plugins) to the GraphDeveloperExperiences_Public Azure Artifacts feed, which has Maven Central as a CFS upstream. This complies with network isolation on 1ES agents by routing through the approved Centralized Feed Service instead of public endpoints. Also removes failed featureFlags and networkIsolationPolicy parameters that are not supported for Java in 1ES Pipeline Templates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ddd0e8f commit 1c3dd93

1 file changed

Lines changed: 25 additions & 8 deletions

File tree

‎.azure-pipelines/daily-ci-build.yml‎

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,10 @@ resources:
1919
extends:
2020
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
2121
parameters:
22-
settings:
23-
networkIsolationPolicy: Permissive
2422
pool:
2523
name: Azure-Pipelines-1ESPT-ExDShared
2624
image: ubuntu-latest
2725
os: linux
28-
featureFlags:
29-
java:
30-
internalModuleProxy:
31-
enabled: true
3226
sdl:
3327
sourceAnalysisPool:
3428
name: Azure-Pipelines-1ESPT-ExDShared
@@ -55,15 +49,38 @@ extends:
5549
sed -i "/spotbugsMain/,/^}/d" build.gradle
5650
sed -i "/spotbugsTest/,/^}/d" build.gradle
5751
sed -i "/sonarqube {/,/^}/d" build.gradle
58-
displayName: Remove code analysis plugins (not available in network-isolated agents)
52+
displayName: Remove code analysis plugins (not available on network-isolated agents)
53+
54+
- script: |
55+
cat > init.gradle << 'EOF'
56+
allprojects {
57+
repositories {
58+
clear()
59+
maven {
60+
url 'https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/GraphDeveloperExperiences_Public/maven/v1'
61+
}
62+
}
63+
}
64+
settingsEvaluated { settings ->
65+
settings.pluginManagement {
66+
repositories {
67+
clear()
68+
maven {
69+
url 'https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/GraphDeveloperExperiences_Public/maven/v1'
70+
}
71+
}
72+
}
73+
}
74+
EOF
75+
displayName: Configure Gradle to use CFS upstream feed
5976
6077
- task: Gradle@4
6178
displayName: Build and Test SDK
6279
inputs:
6380
gradleWrapperFile: 'gradlew'
6481
workingDirectory: '$(Build.SourcesDirectory)'
6582
tasks: 'assemble test'
66-
options: '--no-daemon'
83+
options: '--no-daemon --init-script init.gradle'
6784
publishJUnitResults: true
6885
testResultsFiles: '**/TEST-*.xml'
6986
javaHomeOption: 'JDKVersion'

0 commit comments

Comments
 (0)