Skip to content

Commit 69f71a0

Browse files
authored
Merge pull request #87 from microsoftgraph/feature/v2
Feature/v2
2 parents 81079a5 + efa5a49 commit 69f71a0

File tree

190 files changed

+15525
-1782
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+15525
-1782
lines changed

.azure-pipelines/buildAndPackage.yml

Lines changed: 9 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ trigger:
99
- dev
1010
- main
1111
- master
12+
- feature/v2
1213
paths:
1314
include:
1415
- src/*
1516
exclude:
17+
- .gradle/wrapper
1618
- .gitignore
1719
- CONTRIBUTING.md
1820
- LICENSE
1921
- THIRD PARTY NOTICES
20-
- build.gradle
2122
- gradle.properties
2223
- gradlew
2324
- gradlew.bat
@@ -28,78 +29,12 @@ trigger:
2829
pr: none
2930

3031
pool:
31-
vmImage: 'windows-latest'
32+
vmImage: windows-latest
3233

3334
steps:
34-
- checkout: self
35-
clean: true
36-
fetchDepth: 1
37-
38-
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
39-
displayName: 'Run CredScan'
40-
inputs:
41-
debugMode: false
42-
43-
- task: DownloadSecureFile@1
44-
inputs:
45-
secureFile: 'local.properties'
46-
47-
- task: DownloadSecureFile@1
48-
inputs:
49-
secureFile: 'secring.gpg'
50-
51-
- task: DownloadSecureFile@1
52-
inputs:
53-
secureFile: 'secring.gpg.lock'
54-
55-
- task: CopyFiles@2
56-
inputs:
57-
SourceFolder: '$(Agent.TempDirectory)'
58-
Contents: '**'
59-
TargetFolder: '$(System.DefaultWorkingDirectory)'
60-
61-
- task: Gradle@2
62-
inputs:
63-
gradleWrapperFile: 'gradlew'
64-
tasks: 'build'
65-
publishJUnitResults: true
66-
testResultsFiles: '**/TEST-*.xml'
67-
javaHomeOption: 'JDKVersion'
68-
sonarQubeRunAnalysis: false
69-
70-
- task: PublishBuildArtifacts@1
71-
displayName: 'Publish Artifact: drop'
72-
inputs:
73-
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
74-
75-
- task: CopyFiles@2
76-
inputs:
77-
SourceFolder: '$(System.DefaultWorkingDirectory)'
78-
Contents: |
79-
**/libs/*
80-
build/generated-pom.xml
81-
build/generated-pom.xml.asc
82-
build.gradle
83-
gradlew
84-
gradlew.bat
85-
settings.gradle
86-
gradle.properties
87-
**/gradle/wrapper/*
88-
Scripts/**
89-
TargetFolder: '$(Build.ArtifactStagingDirectory)/'
90-
91-
- task: PublishBuildArtifacts@1
92-
inputs:
93-
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
94-
ArtifactName: 'drop'
95-
publishLocation: 'Container'
96-
97-
- task: YodLabs.O365PostMessage.O365PostMessageBuild.O365PostMessageBuild@0
98-
displayName: 'Graph Client Tooling pipeline fail notification'
99-
inputs:
100-
addressType: serviceEndpoint
101-
serviceEndpointName: 'microsoftgraph pipeline status'
102-
title: '$(Build.DefinitionName) failure notification'
103-
text: 'This pipeline has failed. View the build details for further information. This is a blocking failure.'
104-
condition: and(failed(), ne(variables['Build.Reason'], 'Manual'))
105-
enabled: true
35+
- template: templates/checkout-and-credscan.yml
36+
- template: templates/install-java.yml
37+
- template: templates/secure-files.yml
38+
- template: templates/build-and-coverage.yml
39+
- template: templates/publish-artefacts.yml
40+
- template: templates/alert-failure.yml

.azure-pipelines/prValidate.yml

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
pr:
77
branches:
88
include:
9-
- master
10-
- main
119
- dev
10+
- main
11+
- master
12+
- feature/v2
1213
paths:
1314
exclude:
14-
- .azure-pipelines
1515
- .gradle/wrapper
1616
- .gitignore
1717
- CONTRIBUTING.md
@@ -26,38 +26,11 @@ pr:
2626

2727
trigger: none # disable triggers based on commits.
2828

29-
variables:
30-
PACKAGE_NAME: 'microsoft-graph-core'
31-
PROPERTIES_PATH: '.\gradle.properties'
32-
33-
pool:
29+
pool:
3430
vmImage: windows-latest
3531

3632
steps:
37-
- checkout: self
38-
clean: true
39-
fetchDepth: 1
40-
41-
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
42-
displayName: 'Run CredScan'
43-
inputs:
44-
debugMode: false
45-
46-
- task: Gradle@2
47-
inputs:
48-
gradleWrapperFile: 'gradlew'
49-
tasks: 'build'
50-
publishJUnitResults: true
51-
testResultsFiles: '**/TEST-*.xml'
52-
javaHomeOption: 'JDKVersion'
53-
sonarQubeRunAnalysis: false
54-
55-
- task: YodLabs.O365PostMessage.O365PostMessageBuild.O365PostMessageBuild@0
56-
displayName: 'Graph Client Tooling pipeline fail notification'
57-
inputs:
58-
addressType: serviceEndpoint
59-
serviceEndpointName: 'microsoftgraph pipeline status'
60-
title: '$(Build.DefinitionName) failure notification'
61-
text: 'This pipeline has failed. View the build details for further information. This is a blocking failure. '
62-
condition: and(failed(), ne(variables['Build.Reason'], 'Manual'))
63-
enabled: true
33+
- template: templates/checkout-and-credscan.yml
34+
- template: templates/install-java.yml
35+
- template: templates/build-and-coverage.yml
36+
- template: templates/alert-failure.yml
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
steps:
2+
- task: YodLabs.O365PostMessage.O365PostMessageBuild.O365PostMessageBuild@0
3+
displayName: 'Graph Client Tooling pipeline fail notification'
4+
inputs:
5+
addressType: serviceEndpoint
6+
serviceEndpointName: 'microsoftgraph pipeline status'
7+
title: '$(Build.DefinitionName) failure notification'
8+
text: 'This pipeline has failed. View the build details for further information. This is a blocking failure. '
9+
condition: and(failed(), ne(variables['Build.Reason'], 'Manual'))
10+
enabled: true
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
steps:
2+
- task: Gradle@2
3+
inputs:
4+
gradleWrapperFile: 'gradlew'
5+
tasks: 'build'
6+
publishJUnitResults: true
7+
testResultsFiles: '**/TEST-*.xml'
8+
javaHomeOption: 'JDKVersion'
9+
sonarQubeRunAnalysis: false
10+
11+
- task: PublishCodeCoverageResults@1
12+
inputs:
13+
codeCoverageTool: 'JaCoCo'
14+
summaryFileLocation: $(System.DefaultWorkingDirectory)/build/reports/jacoco/test/jacocoTestReport.xml
15+
pathToSources: $(System.DefaultWorkingDirectory)/src/main/java
16+
failIfCoverageEmpty: true
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
steps:
2+
- checkout: self
3+
clean: true
4+
fetchDepth: 1
5+
6+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
7+
displayName: 'Run CredScan'
8+
inputs:
9+
debugMode: false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
steps:
2+
- pwsh: 'Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_windows_hotspot_15.0.2_7.zip -OutFile OpenJDK.zip'
3+
displayName: 'Download JDK'
4+
5+
- task: JavaToolInstaller@0
6+
inputs:
7+
versionSpec: '15'
8+
jdkArchitectureOption: 'x64'
9+
jdkSourceOption: 'LocalDirectory'
10+
jdkFile: 'OpenJDK.zip'
11+
jdkDestinationDirectory: 'binaries'
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
steps:
2+
- task: CopyFiles@2
3+
inputs:
4+
SourceFolder: '$(System.DefaultWorkingDirectory)'
5+
Contents: |
6+
**/libs/*
7+
build/generated-pom.xml
8+
build/generated-pom.xml.asc
9+
build.gradle
10+
gradlew
11+
gradlew.bat
12+
settings.gradle
13+
gradle.properties
14+
**/gradle/**
15+
Scripts/**
16+
TargetFolder: '$(Build.ArtifactStagingDirectory)/'
17+
18+
- task: PublishBuildArtifacts@1
19+
displayName: 'Publish Artifact: drop'
20+
inputs:
21+
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
steps:
2+
- task: DownloadSecureFile@1
3+
inputs:
4+
secureFile: 'local.properties'
5+
6+
- task: DownloadSecureFile@1
7+
inputs:
8+
secureFile: 'secring.gpg'
9+
10+
- task: DownloadSecureFile@1
11+
inputs:
12+
secureFile: 'secring.gpg.lock'
13+
14+
- task: CopyFiles@2
15+
inputs:
16+
SourceFolder: '$(Agent.TempDirectory)'
17+
Contents: '**'
18+
TargetFolder: '$(System.DefaultWorkingDirectory)'
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "Checks the SDK only using APIs from the targeted API level"
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
- master
8+
pull_request:
9+
branches:
10+
- dev
11+
- master
12+
- feature/v2
13+
14+
jobs:
15+
lint-api-level:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-java@v1
20+
with:
21+
java-version: 15
22+
- name: Setup Android SDK
23+
uses: android-actions/setup-android@v2
24+
- name: Add execution right to the script
25+
run: chmod +x gradlew
26+
working-directory: ./android
27+
- name: Build SDK with Android project configuration
28+
id: lint
29+
run: ./gradlew --no-daemon build
30+
working-directory: ./android
31+
- name: Upload linting results
32+
if: failure() && steps.lint.outcome == 'failure'
33+
uses: actions/upload-artifact@v2
34+
with:
35+
name: lint-report
36+
path: ./android/build/reports
37+

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ jobs:
2222
# a pull request then we can checkout the head.
2323
fetch-depth: 2
2424

25+
- uses: actions/setup-java@v1
26+
with:
27+
java-version: 15
28+
2529
# If this run was triggered by a pull request event, then checkout
2630
# the head of the pull request instead of the merge commit.
2731
- run: git checkout HEAD^2

0 commit comments

Comments
 (0)