Skip to content

Commit 1fc1d12

Browse files
authored
Merge pull request #863 from microsoftgraph/rsh/updateDropPath
Rsh/update drop path
2 parents 0d4b7d1 + 99e1e43 commit 1fc1d12

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

.azure-pipelines/buildAndPackage.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ pr:
2525

2626
pool:
2727
vmImage: windows-latest
28+
29+
variables:
30+
DROP_PATH: '$(Agent.BuildDirectory)/Drop'
2831

2932
stages:
3033
- stage: Build
@@ -51,11 +54,14 @@ stages:
5154
deploy:
5255
steps:
5356
- template: templates/download-artifacts.yml
57+
parameters:
58+
directoryPath: $(DROP_PATH)
5459
- template: templates/install-java.yml
5560
- template: templates/secure-files.yml
5661
- template: templates/copy-and-build.yml
5762
parameters:
5863
task: 'publishSnapshotPublicationToSonatypeSnapshotRepository'
64+
directoryPath: $(DROP_PATH)
5965

6066
- stage: Maven_Release_And_Github_Release
6167
dependsOn: Build
@@ -70,13 +76,16 @@ stages:
7076
deploy:
7177
steps:
7278
- template: templates/download-artifacts.yml
79+
parameters:
80+
directoryPath: $(DROP_PATH)
7381
- template: templates/install-java.yml
7482
- template: templates/secure-files.yml
7583
parameters:
7684
stageID: 'release'
7785
- template: templates/copy-and-build.yml
7886
parameters:
7987
task: 'publishMavenCentralReleasePublicationToSonatypeRepository'
88+
directoryPath: $(DROP_PATH)
8089

8190
- deployment: Github_Release
8291
dependsOn: Maven_Release
@@ -88,6 +97,9 @@ stages:
8897
deploy:
8998
steps:
9099
- template: templates/download-artifacts.yml
100+
parameters:
101+
directoryPath: $(DROP_PATH)
91102
- template: templates/version-and-release.yml
92103
parameters:
93104
gitConnection: 'microsoftgraphrelease'
105+
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

.azure-pipelines/templates/download-artifacts.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
parameters:
2+
- name: directoryPath
3+
type: string
4+
15
steps:
26
- download: none
37
- task: DownloadPipelineArtifact@2
@@ -7,4 +11,4 @@ steps:
711
itemPattern: |
812
**
913
*
10-
targetPath: '$(Agent.BuildDirectory)/Drop/'
14+
targetPath: '${{ parameters.directoryPath }}/'

.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)