【发布时间】:2019-11-13 00:35:24
【问题描述】:
是否可以从 Azure Pipeline 步骤调用节点 shebang 脚本?
我有一个沿这些线的节点shebang,但我不知道从管道步骤调用它涉及什么:
const processUrl = async (url, reportDir) => {
console.log(chalk.yellow(`about to run lighthouse tests against ${url}`));
try {
await runCmd('docker',
[
'run',
'--rm',
'-it',
'-v',
`${reportDir}:/home/chrome/reports`,
'-v',
`${path.join(process.cwd(), 'lighthouse')}:/home/chrome/reports/config`,
'femtopixel/google-lighthouse',
url.replace("localhost", "host.docker.internal"),
'--config-path',
'./config/lighthouse-config.js',
'--output',
'html',
'--output',
'json'
])
} catch(err) {
console.error(err);
}
}
【问题讨论】:
标签: node.js azure azure-devops azure-pipelines