Skip to content

Commit dc22e09

Browse files
committed
added DROP_PATH vairable to .yml, pass the variable to reqruied templates
1 parent 303a5d1 commit dc22e09

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

.azure-pipelines/buildAndPackage.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,14 @@ stages:
5454
deploy:
5555
steps:
5656
- template: templates/download-artifacts.yml
57+
parameters:
58+
directoryPath: $(DROP_PATH)
5759
- template: templates/install-java.yml
5860
- template: templates/secure-files.yml
5961
- template: templates/copy-and-build.yml
6062
parameters:
6163
task: 'publishSnapshotPublicationToSonatypeSnapshotRepository'
64+
directoryPath: $(DROP_PATH)
6265

6366
- stage: Maven_Release_And_Github_Release
6467
dependsOn: Build
@@ -73,6 +76,8 @@ stages:
7376
deploy:
7477
steps:
7578
- template: templates/download-artifacts.yml
79+
parameters:
80+
directoryPath: $(DROP_PATH)
7681
- template: templates/install-java.yml
7782
- template: templates/secure-files.yml
7883
parameters:
@@ -91,6 +96,9 @@ stages:
9196
deploy:
9297
steps:
9398
- template: templates/download-artifacts.yml
99+
parameters:
100+
directoryPath: $(DROP_PATH)
94101
- template: templates/version-and-release.yml
95102
parameters:
96103
gitConnection: 'microsoftgraphrelease'
104+
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)