Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 781f57d

Browse files
committed
Update taskcluster scripts to support v2 signing (#1954)
1 parent 8641663 commit 781f57d

File tree

2 files changed

+11
-21
lines changed

2 files changed

+11
-21
lines changed

.taskcluster.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ tasks:
102102
path: '/opt/FirefoxReality/builds/'
103103
expires: {$fromNow: '1 month'}
104104
metadata:
105-
name: Firefox Reality for Android - Build - Master update
106-
description: Building Firefox Reality for Android (via Gradle) - triggered by update to master or feature branch
105+
name: Firefox Reality for Android - Build - ${event.ref[11:]} update
106+
description: Building Firefox Reality for Android (via Gradle) - triggered by update to ${event.ref[11:]} branch
107107
108108
source: ${repository}
109109
###############################################################################
@@ -153,7 +153,7 @@ tasks:
153153
expires: {$fromNow: '1 year'}
154154
metadata:
155155
name: Firefox Reality for Android - Release Build (${event.release.tag_name})
156-
description: Building Firefox Reality for Android (via Gradle) - triggered by release
156+
description: Building Firefox Reality for Android (via Gradle) - triggered by release (${event.release.tag_name})
157157
158158
source: ${repository}
159159

tools/taskcluster/sign_apk.py

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ def main(name, argv):
3636

3737

3838
build_output_path = './app/build/outputs/apk'
39+
# Create folder for saving build artifacts
40+
artifacts_path = './builds'
41+
if not os.path.exists(artifacts_path):
42+
os.makedirs(artifacts_path)
3943

4044
# Sign APKs
4145
for apk in glob.glob(build_output_path + "/*/*/*-unsigned.apk"):
@@ -50,24 +54,10 @@ def main(name, argv):
5054
"-o", target,
5155
"-H", "Authorization: " + token,
5256
sign_url])
53-
54-
# Run zipalign
55-
for apk in glob.glob(build_output_path + "/*/*/*-signed.apk"):
56-
split = os.path.splitext(apk)
57-
print subprocess.check_output(["zipalign", "-f", "-v", "-p", "4", apk, split[0] + "-aligned" + split[1]])
58-
59-
# Create folder for saving build artifacts
60-
artifacts_path = './builds'
61-
if not os.path.exists(artifacts_path):
62-
os.makedirs(artifacts_path)
63-
64-
# Verify signature and move APK to artifact path
65-
for apk in glob.glob(build_output_path + "/*/*/*-signed-*.apk"):
66-
print "Verifying", apk
67-
print subprocess.check_output(['apksigner', 'verify', apk])
68-
69-
print "Archiving", apk
70-
os.rename(apk, artifacts_path + "/" + os.path.basename(apk))
57+
print "Verifying", target
58+
print subprocess.check_output(['apksigner', 'verify', target])
59+
print "Archiving", target
60+
os.rename(target, artifacts_path + "/" + os.path.basename(target))
7161

7262
if __name__ == "__main__":
7363
main(sys.argv[0], sys.argv[1:])

0 commit comments

Comments
 (0)