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
12 changes: 12 additions & 0 deletions .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,11 +60,14 @@ 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: []
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)
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