-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathazure-pipelines.yml
150 lines (127 loc) · 4.9 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
download_url: 'https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/windows/apktool.bat'
stages:
- stage: Cache_ApkTool
pool:
vmImage: 'windows-latest'
jobs:
- job: Multi_Download
steps:
- template: /azure/steps/multi-download-and-cache.yml
parameters:
name: cachemulti
folder_to_cache: 'multicache'
cache_name: 'multi'
downloads:
- name: test
source_url: $(download_url)
target_file_name: download1
- name: test2
source_url: $(download_url)
target_file_name: download2
- name: test3
source_url: $(download_url)
target_file_name: download3
- job: Test_Download_And_Cache
dependsOn: Multi_Download
steps:
- template: /azure/steps/download-and-cache.yml
parameters:
name: cache1
source_url: $(download_url)
target_file_name: 'apk.bat'
folder_to_cache: 'apk_cached'
cache_name: 'apktool'
cache_timeout: '0.00:00:01.00'
- job: Test_Download_And_Cache2
dependsOn: Test_Download_And_Cache
steps:
- template: /azure/steps/download-and-cache.yml
parameters:
name: cache2
source_url: $(download_url)
target_file_name: 'apk.bat'
folder_to_cache: 'apk_cached'
cache_name: 'apktool'
cache_timeout: '0.00:00:01.00'
- job: Test_Download_And_Cache3
dependsOn: Test_Download_And_Cache2
steps:
- template: /azure/steps/download-and-cache.yml
parameters:
name: cache2
source_url: $(download_url)
target_file_name: 'apk.bat'
folder_to_cache: 'apk_cached'
cache_name: 'apktool'
cache_timeout: '0.01:00:01.00'
- job: Test_Download_Url_To_File
dependsOn: Test_Download_And_Cache3
steps:
- template: /azure/steps/download-url-to-file.yml
parameters:
name: 'downloadfile'
source_url: $(download_url)
target_path: '$(Pipeline.Workspace)/apk-tool1.bat'
file_path_variable: 'download_path'
- script: echo 'Downloaded $(downloadfile.downloaded) - $(downloadfile.download_path)'
- template: /azure/steps/download-url-to-file.yml
parameters:
name: 'downloadfile2'
source_url: $(download_url)
target_path: '$(Pipeline.Workspace)/apk-tool1.bat'
file_path_variable: 'download_path'
- script: echo 'Downloaded $(downloadfile2.downloaded) - $(downloadfile2.download_path)'
- template: /azure/steps/download-url-to-file.yml
parameters:
name: 'downloadfile3'
source_url: $(download_url)
target_path: '$(Pipeline.Workspace)/apk-tool1.bat'
file_path_variable: 'download_path'
overwrite_existing: true
- script: echo 'Downloaded $(downloadfile3.downloaded) - $(downloadfile3.download_path)'
- template: /azure/steps/download-url-to-file.yml
parameters:
name: 'downloadtofile1'
source_url: $(download_url)
target_path: '$(Pipeline.Workspace)/apk-tool2.bat'
- template: /azure/steps/checks/check-file-exists.yml
parameters:
path_to_check: '$(Pipeline.Workspace)/apk-tool2.bat'
- template: /azure/steps/download-url-to-file.yml
parameters:
name: 'downloadtofile2'
source_url: $(download_url)
target_path: '$(Pipeline.Workspace)/apk-tool3.bat'
- template: /azure/steps/checks/check-file-exists.yml
parameters:
path_to_check: '$(Pipeline.Workspace)/apk-tool3.bat'
- job: Cache_ApkTool
dependsOn: Test_Download_Url_To_File
steps:
- task: PowerShell@2
name: ApkToolVersion
displayName: 'Generate version number based on current datetime'
inputs:
targetType: 'inline'
workingDirectory: $(Pipeline.Workspace)
script: |
$current = Get-Date -Format "yyyyMMddHHmm"
echo "##vso[task.setvariable variable=VersionNumber;isOutput=true]$current"
- template: /azure/steps/android/apktool-install.yml
parameters:
name: 'apktoolinstall1'
apktool_version: $(ApkToolVersion.VersionNumber)
- job: Test_ApkTool_Cache
dependsOn: Cache_ApkTool
variables:
VersionNumber: $[ dependencies.Cache_ApkTool.outputs['ApkToolVersion.VersionNumber'] ]
steps:
- template: /azure/steps/android/apktool-install.yml
parameters:
name: 'apktoolinstall2'
apktool_version: $(VersionNumber)