Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
omit(
[
'taskGroupId',
'routes',
'dependencies',
'requires',
'scopes',
'payload'
],
cloneDeep(task)
),
{
retries: 0,
deadline: fromNowJSON('12 hours'),
created: fromNowJSON(),
expires: fromNowJSON('7 days'),
scopes: task.scopes.filter(scope => !/^docker-worker:cache:/.test(scope)), // Delete cache scopes
payload: merge(omit(['artifacts', 'cache'], task.payload || {}), {
maxRunTime: Math.max(
task.payload && task.payload.maxRunTime,
3 * 60 * 60
),
features: {
interactive: true
},
env: {
TASKCLUSTER_INTERACTIVE: 'true'
}
})
}
);
merge(
omit(
[
'taskGroupId',
'routes',
'dependencies',
'requires',
'scopes',
'payload'
],
cloneDeep(task)
),
{
retries: 0,
deadline: fromNowJSON('12 hours'),
created: fromNowJSON(),
expires: fromNowJSON('7 days'),
scopes: task.scopes.filter(scope => !/^docker-worker:cache:/.test(scope)), // Delete cache scopes
payload: merge(omit(['artifacts', 'cache'], task.payload || {}), {
maxRunTime: Math.max(
task.payload && task.payload.maxRunTime,
3 * 60 * 60
),
features: {
interactive: true
},
env: {
TASKCLUSTER_INTERACTIVE: 'true'
}
})
}
);
export const parameterizeTask = task =>
merge(
omit(
[
'taskGroupId',
'routes',
'dependencies',
'requires',
'scopes',
'payload'
],
cloneDeep(task)
),
{
retries: 0,
deadline: fromNowJSON('12 hours'),
created: fromNowJSON(),
expires: fromNowJSON('7 days'),
scopes: task.scopes.filter(scope => !/^docker-worker:cache:/.test(scope)), // Delete cache scopes
payload: merge(omit(['artifacts', 'cache'], task.payload || {}), {
maxRunTime: Math.max(
task.payload && task.payload.maxRunTime,
3 * 60 * 60
),
features: {
interactive: true
},
env: {
TASKCLUSTER_INTERACTIVE: 'true'
}
})
}