Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@payload_builder(
"scriptworker-signing",
schema={
Required("max-run-time"): int,
Required("signing-type"): text_type,
Required("upstream-artifacts"): [{
Required("taskId"): taskref_or_string,
Required("taskType"): text_type,
Required("paths"): [text_type],
Required("formats"): [text_type],
}]
}
)
def build_scriptworker_signing_payload(config, task, task_def):
worker = task["worker"]
task_def["tags"]["worker-implementation"] = "scriptworker"
task_def["payload"] = {
@payload_builder(
"scriptworker-signing",
schema={
# the maximum time to run, in seconds
Required("max-run-time"): int,
Required("signing-type"): text_type,
# list of artifact URLs for the artifacts that should be signed
Required("upstream-artifacts"): [
{
# taskId of the task with the artifact
Required("taskId"): taskref_or_string,
# type of signing task (for CoT)
Required("taskType"): text_type,
# Paths to the artifacts to sign
Required("paths"): [text_type],
# Signing formats to use on each of the paths
Required("formats"): [text_type],
@payload_builder(
"scriptworker-shipit",
schema={
Required("upstream-artifacts"): [
{
Required("taskId"): taskref_or_string,
Required("taskType"): text_type,
Required("paths"): [text_type],
}
],
Required("release-name"): text_type,
},
)
def build_push_apk_payload(config, task, task_def):
worker = task["worker"]
task_def["tags"]["worker-implementation"] = "scriptworker"
@payload_builder(
"scriptworker-push-apk",
schema={
Required("upstream-artifacts"): [{
Required("taskId"): taskref_or_string,
Required("taskType"): text_type,
Required("paths"): [text_type],
}],
Required("channel"): text_type,
Required("target-store"): text_type,
Required("product"): text_type,
Required("dep"): bool,
}
)
def build_push_apk_payload(config, task, task_def):
worker = task["worker"]
task_def["tags"]["worker-implementation"] = "scriptworker"
@payload_builder(
"scriptworker-pushapk",
schema={
Required("upstream-artifacts"): [
{
Required("taskId"): taskref_or_string,
Required("taskType"): text_type,
Required("paths"): [text_type],
}
],
Required("certificate-alias"): text_type,
Required("channel"): text_type,
Required("commit"): bool,
Required("product"): text_type,
Required("dep"): bool,
},
)