Skip to content

Commit fead581

Browse files
authored
Merge pull request #286 from microsoftgraph/rsh/updateDropPath
Rsh/update drop path
2 parents cba0b3b + 7696fb9 commit fead581

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

.azure-pipelines/buildAndPackage.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ pr:
3232
pool:
3333
vmImage: windows-latest
3434

35+
variables:
36+
DROP_PATH: '$(Agent.BuildDirectory)/Drop'
37+
3538
stages:
3639
- stage: Build
3740
jobs:
@@ -57,11 +60,14 @@ stages:
5760
deploy:
5861
steps:
5962
- template: templates/download-artifacts.yml
63+
parameters:
64+
directoryPath: $(DROP_PATH)
6065
- template: templates/install-java.yml
6166
- template: templates/secure-files.yml
6267
- template: templates/copy-and-build.yml
6368
parameters:
6469
task: 'publishSnapshotPublicationToSonatypeSnapshotRepository'
70+
directoryPath: $(DROP_PATH)
6571

6672
- stage: Maven_Release_And_Github_Release
6773
dependsOn: []
@@ -76,13 +82,16 @@ stages:
7682
deploy:
7783
steps:
7884
- template: templates/download-artifacts.yml
85+
parameters:
86+
directoryPath: $(DROP_PATH)
7987
- template: templates/install-java.yml
8088
- template: templates/secure-files.yml
8189
parameters:
8290
stageID: 'release'
8391
- template: templates/copy-and-build.yml
8492
parameters:
8593
task: 'publishMavenCentralReleasePublicationToSonatypeRepository'
94+
directoryPath: $(DROP_PATH)
8695

8796
- deployment: Github_Release
8897
dependsOn: Maven_Release
@@ -94,6 +103,9 @@ stages:
94103
deploy:
95104
steps:
96105
- template: templates/download-artifacts.yml
106+
parameters:
107+
directoryPath: $(DROP_PATH)
97108
- template: templates/version-and-release.yml
98109
parameters:
99110
gitConnection: 'microsoftgraphrelease'
111+
directoryPath: $(DROP_PATH)

.azure-pipelines/templates/copy-and-build.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@ parameters:
22
- name: task
33
type: string
44
default: ''
5+
- name: directoryPath
6+
type: string
57

68
steps:
79
- task: CopyFiles@2
810
inputs:
911
SourceFolder: '$(Agent.TempDirectory)'
1012
Contents: '**'
11-
TargetFolder: '$(Agent.BuildDirectory)/Drop/'
13+
TargetFolder: '${{ parameters.directoryPath }}/'
1214

1315
- task: Gradle@2
1416
inputs:
15-
gradleWrapperFile: $(Agent.BuildDirectory)/Drop/gradlew
16-
workingDirectory: '$(Agent.BuildDirectory)/Drop/'
17+
gradleWrapperFile: ${{ parameters.directoryPath }}/gradlew
18+
workingDirectory: '${{ parameters.directoryPath }}/'
1719
options: '-x jar -x javadoc -x javadocJar -x compileJava -x processResources -x classes -x sourceJar'
1820
tasks: ${{ parameters.task }}
1921
publishJUnitResults: true
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
parameters:
2+
- name: directoryPath
3+
type: string
4+
15
steps:
26
- download: none
37
- task: DownloadPipelineArtifact@2
48
inputs:
59
source: current
610
artifact: Drop
7-
path: '$(Agent.BuildDirectory)/Drop/'
11+
path: '${{ parameters.directoryPath }}/'
812
patterns: |
913
**
10-
*
14+
*

.azure-pipelines/templates/version-and-release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ parameters:
22
- name: gitConnection
33
type: string
44
default: ''
5+
- name: directoryPath
6+
type: string
57

68
steps:
79
- task: PowerShell@2
810
inputs:
9-
filePath: '$(DROP_PATH)/Scripts/getLatestVersion.ps1'
10-
arguments: '-propertiesPath "$(DROP_PATH)/gradle.properties"'
11+
filePath: '${{ parameters.directoryPath }}/Scripts/getLatestVersion.ps1'
12+
arguments: '-propertiesPath "${{ parameters.directoryPath }}/gradle.properties"'
1113
pwsh: true
1214

1315
- task: GitHubRelease@1

0 commit comments

Comments
 (0)