Skip to content

Commit 76ec6d5

Browse files
Fix daily CI pool image and add CFS feed configuration
- Switched to Gradle@4 ADO task with proper pool configuration (added image: ubuntu-latest) - Added network isolation policy with sed steps to strip public repos for restricted network builds - Added CFS upstream Azure Artifacts feed for dependency resolution in build.gradle, settings.gradle - Added CFS feed URL and credential placeholders in gradle.properties Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0f73dff commit 76ec6d5

4 files changed

Lines changed: 52 additions & 12 deletions

File tree

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

Lines changed: 17 additions & 12 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,17 +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)
55-
56-
- script: ./gradlew test
57-
displayName: Run unit tests
58-
workingDirectory: $(Build.SourcesDirectory)

build.gradle

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

3846
apply from: "gradle/dependencies.gradle"
@@ -85,6 +93,14 @@ publishing {
8593
name = "ADO"
8694
url = layout.buildDirectory.dir("publishing-repository")
8795
}
96+
maven {
97+
url 'https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/GraphDeveloperExperiences_Public/maven/v1'
98+
name 'GraphDeveloperExperiencesPublic'
99+
credentials(PasswordCredentials)
100+
authentication {
101+
basic(BasicAuthentication)
102+
}
103+
}
88104
}
89105
}
90106

gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,7 @@ mavenArtifactSuffix =
3939
#enable mavenCentralPublishingEnabled to publish to maven central
4040
mavenCentralSnapshotArtifactSuffix = -SNAPSHOT
4141
mavenCentralPublishingEnabled=true
42+
43+
# Azure Artifacts CFS feed credentials
44+
GraphDeveloperExperiencesPublicUsername=microsoftgraph
45+
GraphDeveloperExperiencesPublicPassword=PERSONAL_ACCESS_TOKEN

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)