Skip to content

Commit 634c392

Browse files
committed
template parameters for secure-files.yml
1 parent 1ab2c15 commit 634c392

5 files changed

Lines changed: 36 additions & 42 deletions

File tree

‎.azure-pipelines/buildAndPackage.yml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ stages:
3737
steps:
3838
- template: templates/build/checkout-and-credscan.yml
3939
- template: templates/build/install-java.yml
40-
- template: templates/build/secure-files.yml
40+
- template: templates/secure-files.yml
41+
parameters:
42+
stageID: 'build'
4143
- template: templates/build/build-and-coverage.yml
4244
- template: templates/build/publish-artefacts.yml
4345
- template: templates/alert-failure.yml
@@ -48,7 +50,7 @@ stages:
4850
- job: Maven-Preview
4951
steps:
5052
- template: templates/download-artifacts.yml
51-
- template: templates/meven-preview/secure-files.yml
53+
- template: templates/secure-files.yml
5254
- template: templates/meven-preview/copy-and-build.yml
5355
- template: templates/alert-failure.yml
5456

@@ -64,7 +66,9 @@ stages:
6466
runOnce:
6567
deploy:
6668
steps:
67-
- template: templates/meven-release/secure-files.yml
69+
- template: templates/secure-files.yml
70+
parameters:
71+
stageID: 'release'
6872
- template: templates/meven-release/copy-and-build.yml
6973
- template: templates/alert-failure.yml
7074

‎.azure-pipelines/templates/build/secure-files.yml‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎.azure-pipelines/templates/maven-preview/secure-files.yml‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎.azure-pipelines/templates/maven-release/secure-files.yml‎

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
parameters:
2+
- name: stageID
3+
type: string
4+
default: ''
5+
6+
steps:
7+
- task: DownloadSecureFile@1
8+
inputs:
9+
secureFile: 'local.properties'
10+
retryCount: '5'
11+
12+
- ${{ if or(eq(parameters.stageID, 'release'), eq(parameters.stageID, 'build') }}:
13+
- task: DownloadSecureFile@1
14+
inputs:
15+
secureFile: 'secring.gpg'
16+
retryCount: '5'
17+
18+
- task: DownloadSecureFile@1
19+
inputs:
20+
secureFile: 'secring.gpg.lock'
21+
retryCount: '5'
22+
23+
- ${{ if eq(parameters.stageID, 'build') }}:
24+
- task: CopyFiles@2
25+
inputs:
26+
SourceFolder: '$(Agent.TempDirectory)'
27+
Contents: '**'
28+
TargetFolder: '$(System.DefaultWorkingDirectory)'
29+

0 commit comments

Comments
 (0)