Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions .azure-pipelines/daily-ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ extends:
parameters:
pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: ubuntu-latest
os: linux
sdl:
sourceAnalysisPool:
Expand All @@ -42,17 +43,21 @@ extends:
- checkout: self
submodules: recursive

- task: JavaToolInstaller@0
displayName: Set up Java
- script: |
sed -i "/mavenCentral()/d" build.gradle
sed -i "/gradlePluginPortal()/d" settings.gradle
sed -i "/mavenCentral()/d" settings.gradle
displayName: Strip plugins and public repos for network-isolated build

- task: Gradle@4
displayName: Build and Test SDK
inputs:
versionSpec: '17'
gradleWrapperFile: 'gradlew'
workingDirectory: '$(Build.SourcesDirectory)'
tasks: 'assemble test'
options: '--no-daemon -PGraphDeveloperExperiencesPublicPassword=$(ARTIFACTS_PAT)'
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.17'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'

- script: chmod +x gradlew && ./gradlew assemble
displayName: Build SDK
workingDirectory: $(Build.SourcesDirectory)

- script: ./gradlew test
displayName: Run unit tests
workingDirectory: $(Build.SourcesDirectory)
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ sourceSets {
repositories {
// You can declare any Maven/Ivy/file repository here.
mavenCentral()
maven {
url 'https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/GraphDeveloperExperiences_Public/maven/v1'
name 'GraphDeveloperExperiencesPublic'
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}

apply from: "gradle/dependencies.gradle"
Expand Down Expand Up @@ -85,6 +93,14 @@ publishing {
name = "ADO"
url = layout.buildDirectory.dir("publishing-repository")
}
maven {
url 'https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/GraphDeveloperExperiences_Public/maven/v1'
name 'GraphDeveloperExperiencesPublic'
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ mavenArtifactSuffix =
#enable mavenCentralPublishingEnabled to publish to maven central
mavenCentralSnapshotArtifactSuffix = -SNAPSHOT
mavenCentralPublishingEnabled=true

# Azure Artifacts CFS feed credentials
GraphDeveloperExperiencesPublicUsername=microsoftgraph
GraphDeveloperExperiencesPublicPassword=PERSONAL_ACCESS_TOKEN
15 changes: 15 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven {
url 'https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/GraphDeveloperExperiences_Public/maven/v1'
name 'GraphDeveloperExperiencesPublic'
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
}

/*
* This file was generated by the Gradle 'init' task.
*
Expand Down
Loading