-
Notifications
You must be signed in to change notification settings - Fork 3
/
develop.yml
163 lines (136 loc) · 4.79 KB
/
develop.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# Android
# Build your Android project with Gradle.
# Add steps that test, sign, and distribute the APK, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/android
trigger:
- develop
pool:
vmImage: 'ubuntu-22.04'
steps:
- task: NodeTool@0
inputs:
versionSource: 'spec'
versionSpec: '16.x'
- task: CmdLine@2
displayName: Install Dependencies
inputs:
script: 'yarn install'
- task: CmdLine@2
displayName: Install GitPython Dependency
inputs:
script: 'python3 -m pip install GitPython'
- task: CmdLine@2
displayName: Install GitPython Dependency
inputs:
script: 'python3 -m pip install ruamel_yaml'
- task: CmdLine@2
displayName: Install Pillow Dependency
inputs:
script: 'python3 -m pip install Pillow'
- task: CmdLine@2
displayName: Install setuptools Dependency
inputs:
script: 'python3 -m pip install setuptools setuptools_rust'
- task: CmdLine@2
displayName: Install paramiko Dependency
inputs:
script: 'python3 -m pip install paramiko'
- task: CmdLine@2
displayName: Install qrcode Dependency
inputs:
script: 'python3 -m pip install qrcode'
- task: CmdLine@2
displayName: Install androguard Dependency
inputs:
script: 'python3 -m pip install androguard'
- task: CmdLine@2
displayName: Install defusedxml Dependency
inputs:
script: 'python3 -m pip install defusedxml'
- task: CmdLine@2
displayName: Clone frdoiddata
inputs:
script: 'git clone https://gitlab.com/fdroid/fdroiddata.git'
workingDirectory: $(Agent.BuildDirectory)
- task: CmdLine@2
displayName: Clone fdroidserver
inputs:
script: 'git clone https://gitlab.com/fdroid/fdroidserver.git'
workingDirectory: $(Agent.BuildDirectory)
- task: CmdLine@2
displayName: Copy podverse yml to metadata
inputs:
script: 'cp $(Build.Repository.LocalPath)/fdroid/com.podverse.fdroid.yml fdroiddata/metadata'
workingDirectory: $(Agent.BuildDirectory)
- task: CmdLine@2
displayName: Log podverse frdoid yml
inputs:
script: 'cat fdroid/com.podverse.fdroid.yml'
- task: CmdLine@2
displayName: Log fdroiddata metadata podverse yml
inputs:
script: 'cat fdroiddata/metadata/com.podverse.fdroid.yml'
workingDirectory: $(Agent.BuildDirectory)
- task: CmdLine@2
displayName: Read Metadata
inputs:
script: '$(Agent.BuildDirectory)/fdroidserver/fdroid readmeta'
workingDirectory: $(Agent.BuildDirectory)/fdroiddata
- task: CmdLine@2
displayName: Rewrite Metadata
inputs:
script: '$(Agent.BuildDirectory)/fdroidserver/fdroid rewritemeta com.podverse.fdroid'
workingDirectory: $(Agent.BuildDirectory)/fdroiddata
- task: CmdLine@2
displayName: Lint podverse fdroid config file
inputs:
script: '$(Agent.BuildDirectory)/fdroidserver/fdroid lint com.podverse.fdroid'
workingDirectory: $(Agent.BuildDirectory)/fdroiddata
- task: CmdLine@2
displayName: Build fdroid podverse
inputs:
script: '$(Agent.BuildDirectory)/fdroidserver/fdroid build -v -l com.podverse.fdroid'
workingDirectory: $(Agent.BuildDirectory)/fdroiddata
- task: AndroidSigning@3
env:
APK_SIGNER_KEYSTORE_PASSWORD: $(APK_SIGNER_KEYSTORE_PASSWORD)
APK_SIGNER_KEYSTORE_ALIAS: $(APK_SIGNER_KEYSTORE_ALIAS)
APK_SIGNER_KEY_PASSWORD: $(APK_SIGNER_KEY_PASSWORD)
inputs:
apkFiles: '$(Agent.BuildDirectory)/fdroiddata/build/com.podverse.fdroid/android/app/build/outputs/apk/release/app-release-unsigned.apk'
apksign: true
apksignerKeystoreFile: 'podverse-fdroid.keystore'
apksignerKeystorePassword: $(APK_SIGNER_KEYSTORE_PASSWORD)
apksignerKeystoreAlias: $(APK_SIGNER_KEYSTORE_ALIAS)
apksignerKeyPassword: $(APK_SIGNER_KEY_PASSWORD)
apksignerArguments: --out $(Agent.BuildDirectory)/fdroiddata/build/com.podverse.fdroid/android/app/build/outputs/apk/release/podverse-fdroid.signed.release.apk
zipalign: true
- task: PublishBuildArtifacts@1
displayName: Publish build artifact
inputs:
PathtoPublish: '$(Agent.BuildDirectory)/fdroiddata/build/com.podverse.fdroid/android/app/build/outputs/apk/release'
ArtifactName: 'app_build'
publishLocation: 'Container'
- task: PublishBuildArtifacts@1
displayName: Publish metadata artifact
inputs:
PathtoPublish: '$(Build.Repository.LocalPath)/fdroid/com.podverse.fdroid.yml'
ArtifactName: 'metadata'
publishLocation: 'Container'
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'app_build'
downloadPath: '$(System.ArtifactsDirectory)'
- task: Bash@3
displayName: Upload APK to BrowserStack
inputs:
targetType: 'filePath'
filePath: $(Build.Repository.LocalPath)/azure-pipelines-post-build.sh
env:
APPCENTER_OUTPUT_DIRECTORY: $(System.ArtifactsDirectory)
BS_USERNAME: $(BS_USERNAME)
BS_KEY: $(BS_KEY)
FB_API_KEY: $(FB_API_KEY)
PLATFORM: 'F-Droid'