diff --git a/.azure-pipelines/daily-ci-build.yml b/.azure-pipelines/daily-ci-build.yml index 885f89ee..76eb4dad 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,17 +43,15 @@ extends: - checkout: self submodules: recursive - - task: JavaToolInstaller@0 - displayName: Set up Java + - 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) diff --git a/build.gradle b/build.gradle index 6dc986e8..dcf37902 100644 --- a/build.gradle +++ b/build.gradle @@ -5,8 +5,8 @@ plugins { id 'maven-publish' id 'signing' id 'jacoco' - id 'com.github.spotbugs' version '6.2.5' - id "org.sonarqube" version "7.2.2.6593" + id 'com.github.spotbugs' version '6.5.4' + id "org.sonarqube" version "7.3.0.8198" } @@ -69,6 +69,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" @@ -119,6 +127,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 452d9c38..ef0b9a24 100644 --- a/gradle.properties +++ b/gradle.properties @@ -37,3 +37,7 @@ mavenArtifactSuffix = #enable mavenCentralPublishingEnabled to publish to maven central mavenCentralSnapshotArtifactSuffix = -SNAPSHOT mavenCentralPublishingEnabled=false + +# Azure Artifacts CFS feed credentials +GraphDeveloperExperiencesPublicUsername=microsoftgraph +GraphDeveloperExperiencesPublicPassword=PERSONAL_ACCESS_TOKEN diff --git a/settings.gradle b/settings.gradle index ab8f7824..c27d0783 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. *