我试图在托管Linux池上运行针对Visual Studio Team Services的赛普拉斯测试。不幸的是,托管代理并没有安装赛普拉斯的所有依赖项。
运行记录的in
无效:
apt-get
运行2018-05-18T21:03:14.7423331Z ##[section]Starting: Install cypress dependencies
2018-05-18T21:03:14.7474742Z ==============================================================================
2018-05-18T21:03:14.7488281Z Task : Bash
2018-05-18T21:03:14.7501148Z Description : This is an early preview. Run a Bash script on macOS, Linux, or Windows
2018-05-18T21:03:14.7513088Z Version : 3.127.0
2018-05-18T21:03:14.7524823Z Author : Microsoft Corporation
2018-05-18T21:03:14.7537179Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613738)
2018-05-18T21:03:14.7549730Z ==============================================================================
2018-05-18T21:03:15.0174503Z Generating script.
2018-05-18T21:03:15.0535056Z Script contents:
2018-05-18T21:03:15.0547355Z apt-get install xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2
2018-05-18T21:03:15.0656822Z [command]/bin/bash --noprofile --norc /opt/vsts/work/_temp/cac4d3f9-42e7-49f3-94f6-7d0444827d83.sh
2018-05-18T21:03:15.6040707Z Reading package lists...
2018-05-18T21:03:15.6085335Z Building dependency tree...
2018-05-18T21:03:15.6153815Z Reading state information...
2018-05-18T21:03:15.6186788Z Package libgconf-2-4 is not available, but is referred to by another package.
2018-05-18T21:03:15.6198707Z This may mean that the package is missing, has been obsoleted, or
2018-05-18T21:03:15.6211380Z is only available from another source
2018-05-18T21:03:15.6216969Z
2018-05-18T21:03:15.6229592Z E: Unable to locate package xvfb
2018-05-18T21:03:15.6242128Z E: Unable to locate package libnotify-dev
2018-05-18T21:03:15.6254440Z E: Package 'libgconf-2-4' has no installation candidate
2018-05-18T21:03:15.6268141Z E: Unable to locate package libxss1
2018-05-18T21:03:15.6370826Z ##[error]Bash exited with code '100'.
2018-05-18T21:03:15.7283047Z ##[section]Finishing: Install cypress dependencies
需要永久(25分钟但仍未完成)。
欢迎任何关于如何让赛普拉斯在托管代理上快速工作的线索。
注意:我尝试在Windows上运行,但幸运的是,我没有完全阻止。但是要使用Windows代理,我现在有2个代理阶段,这会因为人工制品下载和npm安装开销而增加开销。
答案 0 :(得分:5)
在运行赛普拉斯之前,在VSTS代理阶段使用预先安装的Shell(Bash)任务解决了这个问题:
apt-get -qq -y update
apt-get -qq -y install xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2