diff --git a/.azure-pipelines/daily-ci-build.yml b/.azure-pipelines/daily-ci-build.yml index 2309bd1b9c0..b411d15ebf8 100644 --- a/.azure-pipelines/daily-ci-build.yml +++ b/.azure-pipelines/daily-ci-build.yml @@ -21,6 +21,7 @@ extends: parameters: pool: name: Azure-Pipelines-1ESPT-ExDShared + image: ubuntu-latest os: linux sdl: sourceAnalysisPool: @@ -42,13 +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) diff --git a/build.gradle b/build.gradle index a37a6b63d81..1e1e8086cb4 100644 --- a/build.gradle +++ b/build.gradle @@ -31,6 +31,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" @@ -83,6 +91,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) + } + } } } diff --git a/gradle.properties b/gradle.properties index e676691254c..b9ecde8b818 100644 --- a/gradle.properties +++ b/gradle.properties @@ -40,6 +40,10 @@ mavenArtifactSuffix = mavenCentralSnapshotArtifactSuffix = -SNAPSHOT mavenCentralPublishingEnabled=true +# Azure Artifacts CFS feed credentials +GraphDeveloperExperiencesPublicUsername=microsoftgraph +GraphDeveloperExperiencesPublicPassword=PERSONAL_ACCESS_TOKEN + diff --git a/settings.gradle b/settings.gradle index 53fc3a5eebe..d75c6264a1d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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. *