Skip to content
This repository has been archived by the owner on Dec 31, 2019. It is now read-only.

Add support for language pack checksums files. #174

Merged
merged 6 commits into from Aug 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion beetmoverscript/constants.py
Expand Up @@ -151,7 +151,8 @@
)

CHECKSUMS_CUSTOM_FILE_NAMING = {
'beetmover-source': '-source'
'beetmover-source': '-source',
'release-beetmover-signed-langpacks': '-langpack',
}

BUILDHUB_ARTIFACT = "buildhub.json"
Expand Down
1 change: 1 addition & 0 deletions beetmoverscript/newsfragments/1463749.added
@@ -0,0 +1 @@
Add support for language pack checksums.
4 changes: 2 additions & 2 deletions beetmoverscript/task.py
Expand Up @@ -89,12 +89,12 @@ def generate_checksums_manifest(context):
return '\n'.join(content)


def is_custom_beetmover_checksums_task(context):
def is_custom_checksums_task(context):
return CHECKSUMS_CUSTOM_FILE_NAMING.get(context.task['tags']['kind'], '')


def add_checksums_to_artifacts(context):
name = is_custom_beetmover_checksums_task(context)
name = is_custom_checksums_task(context)
filename = 'public/target{}.checksums'.format(name)

abs_file_path = os.path.join(context.config['artifact_dir'],
Expand Down
4 changes: 4 additions & 0 deletions beetmoverscript/templates/devedition_candidates.yml
Expand Up @@ -124,6 +124,10 @@ mapping:
s3_key: beetmover-checksums/{{ platform }}/{{ locale }}/firefox-{{ version }}.checksums.asc
destinations:
- beetmover-checksums/{{ platform }}/{{ locale }}/firefox-{{ version }}.checksums.asc
target-langpack.checksums:
s3_key: beetmover-checksums/{{ platform }}/xpi/{{ locale }}.checksums.beet
destinations:
- beetmover-checksums/{{ platform }}/xpi/{{ locale }}.checksums.beet
target-source.checksums:
s3_key: beetmover-checksums/source/firefox-{{ version }}.checksums.beet
destinations:
Expand Down
4 changes: 4 additions & 0 deletions beetmoverscript/templates/devedition_candidates_repacks.yml
Expand Up @@ -76,6 +76,10 @@ mapping:
s3_key: beetmover-checksums/{{ platform }}/{{ locale }}/firefox-{{ version }}.checksums.asc
destinations:
- beetmover-checksums/{{ platform }}/{{ locale }}/firefox-{{ version }}.checksums.asc
target-langpack.checksums:
s3_key: beetmover-checksums/{{ platform }}/xpi/{{ locale }}.checksums.beet
destinations:
- beetmover-checksums/{{ platform }}/xpi/{{ locale }}.checksums.beet
{% for partial in partials %}
{{ partial }}:
s3_key: update/{{ platform }}/{{ locale }}/firefox-{{ partials[partial].previousVersion }}-{{ version }}.partial.mar
Expand Down
4 changes: 4 additions & 0 deletions beetmoverscript/templates/firefox_candidates.yml
Expand Up @@ -124,6 +124,10 @@ mapping:
s3_key: beetmover-checksums/{{ platform }}/{{ locale }}/firefox-{{ version }}.checksums.asc
destinations:
- beetmover-checksums/{{ platform }}/{{ locale }}/firefox-{{ version }}.checksums.asc
target-langpack.checksums:
s3_key: beetmover-checksums/{{ platform }}/xpi/{{ locale }}.checksums.beet
destinations:
- beetmover-checksums/{{ platform }}/xpi/{{ locale }}.checksums.beet
target-source.checksums:
s3_key: beetmover-checksums/source/firefox-{{ version }}.checksums.beet
destinations:
Expand Down
4 changes: 4 additions & 0 deletions beetmoverscript/templates/firefox_candidates_repacks.yml
Expand Up @@ -76,6 +76,10 @@ mapping:
s3_key: beetmover-checksums/{{ platform }}/{{ locale }}/firefox-{{ version }}.checksums.asc
destinations:
- beetmover-checksums/{{ platform }}/{{ locale }}/firefox-{{ version }}.checksums.asc
target-langpack.checksums:
s3_key: beetmover-checksums/{{ platform }}/xpi/{{ locale }}.checksums.beet
destinations:
- beetmover-checksums/{{ platform }}/xpi/{{ locale }}.checksums.beet
{% for partial in partials %}
{{ partial }}:
s3_key: update/{{ platform }}/{{ locale }}/firefox-{{ partials[partial].previousVersion }}-{{ version }}.partial.mar
Expand Down
6 changes: 4 additions & 2 deletions beetmoverscript/test/test_task.py
Expand Up @@ -9,7 +9,7 @@
validate_task_schema, add_balrog_manifest_to_artifacts,
get_upstream_artifacts, generate_checksums_manifest,
get_task_bucket, get_task_action,
validate_bucket_paths, get_release_props, is_custom_beetmover_checksums_task
validate_bucket_paths, get_release_props, is_custom_checksums_task
)
from scriptworker.context import Context
from scriptworker.exceptions import ScriptWorkerTaskException
Expand Down Expand Up @@ -224,7 +224,9 @@ def test_get_release_props(context, mocker, taskjson, locale, relprops, expected
"beetmover-source", "-source"
), (
"beetmover-repackage", ""
), (
"release-beetmover-signed-langpacks", "-langpack"
),))
def test_is_custom_beetmover_task(context, kind, expected):
context.task['tags']['kind'] = kind
assert is_custom_beetmover_checksums_task(context) == expected
assert is_custom_checksums_task(context) == expected
Expand Up @@ -9,7 +9,7 @@
"target": "i686-pc-linux-gnu"
},
"download": {
"date": "2018-06-25T16:25:44.531257+00:00",
"date": "2018-08-08T16:52:42.440388+00:00",
"mimetype": "application/octet-stream",
"size": 7201,
"url": "https://archive.test/pub/mobile/nightly/2016/09/2016-09-01-16-26-14-mozilla-central-fake/en-US/fake%2099.0a1.en-US.target.apk"
Expand Down