展開前に分度器でe2eテストを実行できるはずのJenkinsfileに取り組んでいます。だから私はクロムヘッドレスインストールのためにいくつかのパッケージをインストールする必要があります(はい、私はこのヘッドレスのことを始めるために異なるアイデアで複数のページをチェックしました、しかしそれらのどれも私のために働いていなかったので、私はここで質問に行き着きました)。Jenkinsでビルドを開始すると、次の出力が得られます。
[ature_ChromeHeadlessJenkins-
I3N4DKAF3MHS72RV35MYVEHTF7OCMJ2VQKG54JMW2L7IQHOYN66A] Running shell script
+ apt-get install libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4
libxss1 fonts-liberation libappindicator1 xdg-utils
Reading package lists...
Building dependency tree...
Reading state information...
libgtk2.0-0 is already the newest version (2.24.31-2).
libgtk2.0-0 set to manually installed.
libxpm4 is already the newest version (1:3.5.12-1).
libxpm4 set to manually installed.
libxrender1 is already the newest version (1:0.9.10-1).
libxrender1 set to manually installed.
The following additional packages will be installed:
cpp cpp-6 gconf-service gconf2-common libauthen-sasl-perl libdbus-glib-1-2
libdbusmenu-glib4 libdbusmenu-gtk4 libencode-locale-perl
libfile-basedir-perl libfile-desktopentry-perl libfile-listing-perl
libfile-mimeinfo-perl libfont-afm-perl libhtml-form-perl libhtml-format-perl
libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl
libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl
libhttp-message-perl libhttp-negotiate-perl libindicator7 libio-html-perl
libio-socket-ssl-perl libipc-system-simple-perl libisl15
liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libmpc3
libmpfr4 libnet-dbus-perl libnet-http-perl libnet-smtp-ssl-perl
libnet-ssleay-perl libtext-iconv-perl libtie-ixhash-perl libtimedate-perl
liburi-perl libwww-perl libwww-robotrules-perl libx11-protocol-perl
libxml-parser-perl libxml-twig-perl libxml-xpathengine-perl
perl-openssl-defaults x11-xserver-utils
Suggested packages:
cpp-doc gcc-6-locales libdigest-hmac-perl libgssapi-perl libdata-dump-perl
libcrypt-ssleay-perl libauthen-ntlm-perl libunicode-map8-perl
libunicode-string-perl xml-twig-tools nickle cairo-5c xorg-docs-core
gvfs-bin
The following NEW packages will be installed:
cpp cpp-6 fonts-liberation gconf-service gconf2-common libappindicator1
libauthen-sasl-perl libdbus-glib-1-2 libdbusmenu-glib4 libdbusmenu-gtk4
libencode-locale-perl libfile-basedir-perl libfile-desktopentry-perl
libfile-listing-perl libfile-mimeinfo-perl libfont-afm-perl libgconf-2-4
libhtml-form-perl libhtml-format-perl libhtml-parser-perl
libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl
libhttp-daemon-perl libhttp-date-perl libhttp-message-perl
libhttp-negotiate-perl libindicator7 libio-html-perl libio-socket-ssl-perl
libipc-system-simple-perl libisl15 liblwp-mediatypes-perl
liblwp-protocol-https-perl libmailtools-perl libmpc3 libmpfr4
libnet-dbus-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl
libtext-iconv-perl libtie-ixhash-perl libtimedate-perl liburi-perl
libwww-perl libwww-robotrules-perl libx11-protocol-perl libxml-parser-perl
libxml-twig-perl libxml-xpathengine-perl libxss1 perl-openssl-defaults
x11-xserver-utils xdg-utils
The following packages will be upgraded:
libnss3
1 upgraded, 55 newly installed, 0 to remove and 1 not upgraded.
Need to get 14.9 MB of archives.
After this operation, 45.3 MB of additional disk space will be used.
これはエラーではありませんが、何らかの理由でスクリプトの実行はこの時点で停止します。apt-getまたはdpkgが私の同意をインストールしたいからだと思います。強制的にインストールしようとしましたが、うまくいきませんでした。
ここに私のJenkinsfileの一部があります:
sh 'webdriver-manager update'
sh 'apt-get update'
sh 'apt-get install libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 '
sh 'apt-get install -f libxss1 fonts-liberation libappindicator1 xdg-utils' //FAILS HERE
sh 'wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb'
sh 'dpkg -i --force-all google-chrome-stable_current_amd64.deb'
sh 'apt-get install -f'
sh 'apt-get install xvfb gtk2-engines-pixbuf'
sh 'apt-get install xfonts-cyrillic xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable'
sh 'apt-get install imagemagick x11-apps dbus-x11'
sh 'Xvfb -ac :99 -screen 0 1280x1024x16 & export DISPLAY=:99'
sh 'webdriver-manager start /dev/null 2>&1'
誰かがこの問題で私を助けることができますか?さらに詳しい情報が必要な場合はお問い合わせください。どうも
-yを使用します
それapt-get install -y [package]
が私の問題を解決していることがわかりました。マニュアルページを読むことは、私が見つけた多くのことを助けます...
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加