Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a8ae4c1
Bump mockito-inline from 3.11.2 to 3.12.0
dependabot[bot] Aug 20, 2021
2ea2ab5
Bump mockito-inline from 3.11.2 to 3.12.0
dependabot[bot] Aug 20, 2021
cfea93b
Merge pull request #279 from microsoftgraph/dependabot/maven/org.mock…
baywet Aug 20, 2021
e9b923e
Merge pull request #278 from microsoftgraph/dependabot/gradle/org.moc…
baywet Aug 20, 2021
08006a5
Bump mockito-inline from 3.12.0 to 3.12.1
dependabot[bot] Aug 23, 2021
14d73a7
Bump gson from 2.8.7 to 2.8.8
dependabot[bot] Aug 23, 2021
546792c
Bump mockito-inline from 3.12.0 to 3.12.1
dependabot[bot] Aug 23, 2021
ddacb19
Bump gson from 2.8.7 to 2.8.8
dependabot[bot] Aug 23, 2021
54ff9f8
Merge pull request #284 from microsoftgraph/dependabot/maven/org.mock…
baywet Aug 23, 2021
6c89e54
Merge pull request #282 from microsoftgraph/dependabot/gradle/org.moc…
baywet Aug 23, 2021
b8829bb
Merge pull request #283 from microsoftgraph/dependabot/gradle/com.goo…
baywet Aug 23, 2021
cba0b3b
Merge pull request #285 from microsoftgraph/dependabot/maven/com.goog…
baywet Aug 23, 2021
da5f3e6
Update copy-and-build.yml
ramsessanchez Aug 23, 2021
85158ca
Update download-artifacts.yml
ramsessanchez Aug 23, 2021
57bb58c
added Drop_path varaible to YML, pass vairable to templates
ramsessanchez Aug 23, 2021
a9c71d7
Update copy-and-build.yml
ramsessanchez Aug 23, 2021
553d794
Update copy-and-build.yml
ramsessanchez Aug 23, 2021
7696fb9
Update version-and-release.yml
ramsessanchez Aug 23, 2021
0187cc5
Update getLatestVersion.ps1
ramsessanchez Aug 23, 2021
5aad59d
- fixes stages dependency for release
baywet Aug 24, 2021
fead581
Merge pull request #286 from microsoftgraph/rsh/updateDropPath
baywet Aug 24, 2021
40bf00c
Merge pull request #287 from microsoftgraph/rsh/getLatestVersionPatch
baywet Aug 24, 2021
7cdb8b3
Merge pull request #288 from microsoftgraph/baywet-patch-1
baywet Aug 24, 2021
7107982
Update publish-artefacts.yml
ramsessanchez Aug 24, 2021
310483c
Update publish-artefacts.yml
ramsessanchez Aug 24, 2021
34618f1
move condition to buildAndPackage for readability
ramsessanchez Aug 24, 2021
abeac24
Merge branch 'rsh/updatePublish' of https://github.com/microsoftgraph…
ramsessanchez Aug 24, 2021
a498a6c
Update publish-artefacts.yml
ramsessanchez Aug 24, 2021
89936cd
revert back to single job
ramsessanchez Aug 24, 2021
a55d772
Bump mockito-inline from 3.12.1 to 3.12.3
dependabot[bot] Aug 25, 2021
fe177bd
Bump mockito-inline from 3.12.1 to 3.12.3
dependabot[bot] Aug 25, 2021
5961f5e
Merge pull request #293 from microsoftgraph/dependabot/maven/org.mock…
baywet Aug 25, 2021
b01f081
Merge pull request #292 from microsoftgraph/dependabot/gradle/org.moc…
baywet Aug 25, 2021
b99f216
Merge pull request #291 from microsoftgraph/rsh/updatePublish
baywet Aug 25, 2021
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
14 changes: 13 additions & 1 deletion .azure-pipelines/buildAndPackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ pr:
pool:
vmImage: windows-latest

variables:
DROP_PATH: '$(Agent.BuildDirectory)/Drop'

stages:
- stage: Build
jobs:
Expand All @@ -57,14 +60,17 @@ stages:
deploy:
steps:
- template: templates/download-artifacts.yml
parameters:
directoryPath: $(DROP_PATH)
- template: templates/install-java.yml
- template: templates/secure-files.yml
- template: templates/copy-and-build.yml
parameters:
task: 'publishSnapshotPublicationToSonatypeSnapshotRepository'
directoryPath: $(DROP_PATH)

- stage: Maven_Release_And_Github_Release
dependsOn: []
dependsOn: Build
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
jobs:
- deployment: Maven_Release
Expand All @@ -76,13 +82,16 @@ stages:
deploy:
steps:
- template: templates/download-artifacts.yml
parameters:
directoryPath: $(DROP_PATH)
- template: templates/install-java.yml
- template: templates/secure-files.yml
parameters:
stageID: 'release'
- template: templates/copy-and-build.yml
parameters:
task: 'publishMavenCentralReleasePublicationToSonatypeRepository'
directoryPath: $(DROP_PATH)

- deployment: Github_Release
dependsOn: Maven_Release
Expand All @@ -94,6 +103,9 @@ stages:
deploy:
steps:
- template: templates/download-artifacts.yml
parameters:
directoryPath: $(DROP_PATH)
- template: templates/version-and-release.yml
parameters:
gitConnection: 'microsoftgraphrelease'
directoryPath: $(DROP_PATH)
2 changes: 2 additions & 0 deletions .azure-pipelines/templates/build/publish-artefacts.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
steps:
- task: CopyFiles@2
condition: ne(variables['Build.Reason'], 'PullRequest')
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)'
Contents: |
Expand All @@ -16,5 +17,6 @@ steps:
TargetFolder: '$(Build.ArtifactStagingDirectory)/'

- publish: $(Build.ArtifactStagingDirectory)
condition: ne(variables['Build.Reason'], 'PullRequest')
artifact: Drop
displayName: Publish Build Artifact
8 changes: 5 additions & 3 deletions .azure-pipelines/templates/copy-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@ parameters:
- name: task
type: string
default: ''
- name: directoryPath
type: string

steps:
- task: CopyFiles@2
inputs:
SourceFolder: '$(Agent.TempDirectory)'
Contents: '**'
TargetFolder: '$(Agent.BuildDirectory)/Drop/'
TargetFolder: '${{ parameters.directoryPath }}/'

- task: Gradle@2
inputs:
gradleWrapperFile: $(Agent.BuildDirectory)/Drop/gradlew
workingDirectory: '$(Agent.BuildDirectory)/Drop/'
gradleWrapperFile: ${{ parameters.directoryPath }}/gradlew
workingDirectory: '${{ parameters.directoryPath }}/'
options: '-x jar -x javadoc -x javadocJar -x compileJava -x processResources -x classes -x sourceJar'
tasks: ${{ parameters.task }}
publishJUnitResults: true
Expand Down
8 changes: 6 additions & 2 deletions .azure-pipelines/templates/download-artifacts.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
parameters:
- name: directoryPath
type: string

steps:
- download: none
- task: DownloadPipelineArtifact@2
inputs:
source: current
artifact: Drop
path: '$(Agent.BuildDirectory)/Drop/'
path: '${{ parameters.directoryPath }}/'
patterns: |
**
*
*
6 changes: 4 additions & 2 deletions .azure-pipelines/templates/version-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ parameters:
- name: gitConnection
type: string
default: ''
- name: directoryPath
type: string

steps:
- task: PowerShell@2
inputs:
filePath: '$(DROP_PATH)/Scripts/getLatestVersion.ps1'
arguments: '-propertiesPath "$(DROP_PATH)/gradle.properties"'
filePath: '${{ parameters.directoryPath }}/Scripts/getLatestVersion.ps1'
arguments: '-propertiesPath "${{ parameters.directoryPath }}/gradle.properties"'
pwsh: true

- task: GitHubRelease@1
Expand Down
4 changes: 2 additions & 2 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ dependencies {
// Use JUnit test framework
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.2'
testImplementation 'org.mockito:mockito-inline:3.11.2'
testImplementation 'org.mockito:mockito-inline:3.12.3'

api 'com.squareup.okhttp3:okhttp:4.9.1'

implementation 'com.google.guava:guava:30.1.1-jre'

implementation 'com.google.code.gson:gson:2.8.7'
implementation 'com.google.code.gson:gson:2.8.8'
api 'com.azure:azure-core:1.19.0'
}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.7</version>
<version>2.8.8</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand All @@ -46,7 +46,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>3.11.2</version>
<version>3.12.3</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
9 changes: 5 additions & 4 deletions scripts/getLatestVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ $file = get-item $propertiesPath
$findVersions = $file | Select-String -Pattern "mavenMajorVersion" -Context 0,2
$findVersions = $findVersions -split "`r`n"

$majorVersion = $findVersions[0].Substring($findVersions[0].Length-1)
$minorVersion = $findVersions[1].Substring($findVersions[1].Length-1)
$patchVersion = $findVersions[2].Substring($findVersions[2].Length-1)
$versionIndex = $findVersions[0].IndexOf("=")
$majorVersion = $findVersions[0].Substring($versionIndex+2)
$minorVersion = $findVersions[1].Substring($versionIndex+2)
$patchVersion = $findVersions[2].Substring($versionIndex+2)
$version = "$majorVersion.$minorVersion.$patchVersion"

#Update the VERSION_STRING env variable and inform the user
Write-Host "##vso[task.setVariable variable=VERSION_STRING]$($version)";
Write-Host "Updated the VERSION_STRING enviornment variable with the current Gradle.Properties, $version"
Write-Host "Updated the VERSION_STRING enviornment variable with the current Gradle.Properties, $version"