Skip to content

Commit a7febfa

Browse files
Fix daily CI pool image and add CFS feed support (#2606)
- Added pool image (ubuntu-latest) to 1ES pipeline template - Switched from JavaToolInstaller + script steps to Gradle@4 task - Added sed steps to strip plugins and public repos for network-isolated builds - Added CFS upstream Azure Artifacts feed for dependency resolution - Added pluginManagement repositories block in settings.gradle - Added CFS feed credential placeholders in gradle.properties Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c12f79d commit a7febfa

4 files changed

Lines changed: 52 additions & 8 deletions

File tree

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

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ extends:
2121
parameters:
2222
pool:
2323
name: Azure-Pipelines-1ESPT-ExDShared
24+
image: ubuntu-latest
2425
os: linux
2526
sdl:
2627
sourceAnalysisPool:
@@ -42,13 +43,21 @@ extends:
4243
- checkout: self
4344
submodules: recursive
4445

45-
- task: JavaToolInstaller@0
46-
displayName: Set up Java
46+
- script: |
47+
sed -i "/mavenCentral()/d" build.gradle
48+
sed -i "/gradlePluginPortal()/d" settings.gradle
49+
sed -i "/mavenCentral()/d" settings.gradle
50+
displayName: Strip plugins and public repos for network-isolated build
51+
52+
- task: Gradle@4
53+
displayName: Build and Test SDK
4754
inputs:
48-
versionSpec: '17'
55+
gradleWrapperFile: 'gradlew'
56+
workingDirectory: '$(Build.SourcesDirectory)'
57+
tasks: 'assemble test'
58+
options: '--no-daemon -PGraphDeveloperExperiencesPublicPassword=$(ARTIFACTS_PAT)'
59+
publishJUnitResults: true
60+
testResultsFiles: '**/TEST-*.xml'
61+
javaHomeOption: 'JDKVersion'
62+
jdkVersionOption: '1.17'
4963
jdkArchitectureOption: 'x64'
50-
jdkSourceOption: 'PreInstalled'
51-
52-
- script: chmod +x gradlew && ./gradlew assemble
53-
displayName: Build SDK
54-
workingDirectory: $(Build.SourcesDirectory)

build.gradle

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ sourceSets {
3131
repositories {
3232
// You can declare any Maven/Ivy/file repository here.
3333
mavenCentral()
34+
maven {
35+
url 'https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/GraphDeveloperExperiences_Public/maven/v1'
36+
name 'GraphDeveloperExperiencesPublic'
37+
credentials(PasswordCredentials)
38+
authentication {
39+
basic(BasicAuthentication)
40+
}
41+
}
3442
}
3543

3644
apply from: "gradle/dependencies.gradle"
@@ -83,6 +91,14 @@ publishing {
8391
name = "ADO"
8492
url = layout.buildDirectory.dir("publishing-repository")
8593
}
94+
maven {
95+
url 'https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/GraphDeveloperExperiences_Public/maven/v1'
96+
name 'GraphDeveloperExperiencesPublic'
97+
credentials(PasswordCredentials)
98+
authentication {
99+
basic(BasicAuthentication)
100+
}
101+
}
86102
}
87103
}
88104

gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ mavenArtifactSuffix =
4040
mavenCentralSnapshotArtifactSuffix = -SNAPSHOT
4141
mavenCentralPublishingEnabled=true
4242

43+
# Azure Artifacts CFS feed credentials
44+
GraphDeveloperExperiencesPublicUsername=microsoftgraph
45+
GraphDeveloperExperiencesPublicPassword=PERSONAL_ACCESS_TOKEN
46+
4347

4448

4549

settings.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
pluginManagement {
2+
repositories {
3+
gradlePluginPortal()
4+
mavenCentral()
5+
maven {
6+
url 'https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/GraphDeveloperExperiences_Public/maven/v1'
7+
name 'GraphDeveloperExperiencesPublic'
8+
credentials(PasswordCredentials)
9+
authentication {
10+
basic(BasicAuthentication)
11+
}
12+
}
13+
}
14+
}
15+
116
/*
217
* This file was generated by the Gradle 'init' task.
318
*

0 commit comments

Comments
 (0)