Skip to content

Commit

Permalink
Bug 1447263 - Add push-snap support (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanLorenzo committed Apr 4, 2018
1 parent e100572 commit 72682f9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
4 changes: 4 additions & 0 deletions scriptworker/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@
'project:releng:signing:cert:nightly-signing': 'all-nightly-branches',
'project:releng:signing:cert:release-signing': 'all-release-branches',

'project:releng:snapcraft:firefox:beta': 'beta',
'project:releng:snapcraft:firefox:candidate': 'release',
'project:releng:snapcraft:firefox:mock': 'all-staging-branches',

'project:releng:ship-it:production': 'all-production-branches',
'project:releng:ship-it:staging': 'all-staging-branches',

Expand Down
17 changes: 17 additions & 0 deletions scriptworker/cot/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ def get_valid_task_types():
'decision': verify_parent_task,
'docker-image': verify_docker_image_task,
'pushapk': verify_pushapk_task,
'pushsnap': verify_pushsnap_task,
'shipit': verify_shipit_task,
'signing': verify_signing_task,
'partials': verify_partials_task,
Expand Down Expand Up @@ -1520,6 +1521,22 @@ async def verify_pushapk_task(chain, obj):
return await verify_scriptworker_task(chain, obj)


async def verify_pushsnap_task(chain, obj):
"""Verify the pushsnap trust object.
Currently the only check is to make sure it was run on a scriptworker.
Args:
chain (ChainOfTrust): the chain we're operating on
obj (ChainOfTrust or LinkOfTrust): the trust object for the pushsnap task.
Raises:
CoTError: on error.
"""
return await verify_scriptworker_task(chain, obj)


async def verify_shipit_task(chain, obj):
"""Verify the ship-it trust object.
Expand Down
5 changes: 3 additions & 2 deletions scriptworker/test/test_cot_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -1416,8 +1416,9 @@ async def test_verify_docker_image_task_command(chain, docker_image_link):
# verify_scriptworker_task {{{1
@pytest.mark.parametrize("func", ["verify_balrog_task", "verify_beetmover_task",
"verify_bouncer_task", "verify_pushapk_task",
"verify_shipit_task", "verify_signing_task",
"verify_partials_task", "verify_scriptworker_task"])
"verify_pushsnap_task", "verify_shipit_task",
"verify_signing_task", "verify_partials_task",
"verify_scriptworker_task"])
@pytest.mark.asyncio
async def test_verify_scriptworker_task(chain, build_link, func):
build_link.worker_impl = 'scriptworker'
Expand Down

0 comments on commit 72682f9

Please sign in to comment.