Python 理解.git ci实验室文件
谁能解释一下这些写在.git-ci.yaml实验室文件中的命令吗。特别是在哪里可以找到这个opt/chromedriver文件夹,因为它不在存储库中,或者它安装在哪里第一位安装Python、Pip和Google Chrome。并从Python 理解.git ci实验室文件,python,git,ubuntu,selenium-chromedriver,Python,Git,Ubuntu,Selenium Chromedriver,谁能解释一下这些写在.git-ci.yaml实验室文件中的命令吗。特别是在哪里可以找到这个opt/chromedriver文件夹,因为它不在存储库中,或者它安装在哪里第一位安装Python、Pip和Google Chrome。并从requirements.txt文件中安装需求 下一位是与chromedriver相关的位: executing-test: stage: test script: - apt-get update && apt-get install -
requirements.txt
文件中安装需求
下一位是与chromedriver相关的位:
executing-test:
stage: test
script:
- apt-get update && apt-get install --quiet --assume-yes python-dev python-pip unzip wget
- echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >>
/etc/apt/sources.list.d/google-chrome.list
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- apt update
- apt install -y google-chrome-stable
- cp requirements.txt /tmp/requirements.txt
- pip install -r /tmp/requirements.txt
- CHROMEDRIVER_VERSION=`wget --no-verbose --output-document -
https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
- wget --no-verbose --output-document /tmp/chromedriver_linux64.zip
http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip
- unzip -qq /tmp/chromedriver_linux64.zip -d /opt/chromedriver
- chmod +x /opt/chromedriver/chromedriver
- ln -fs /opt/chromedriver/chromedriver /usr/local/bin/chromedriver
- robot -v BROWSER:HeadlessChrome -v APP_ENV:test -d rf_test/reports rf_test/test
这些步骤是:
/opt/chromedriver
/opt/chromedriver/chromedriver
可执行谢谢你。但是在我的gitlab repo中找不到opt/chromedriver文件夹,尽管管道运行时该命令确实成功。如果您阅读了我上面的评论,我已经在第3点解释了
/opt/chromedriver
文件夹的来源。
- CHROMEDRIVER_VERSION=`wget --no-verbose --output-document -
https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
- wget --no-verbose --output-document /tmp/chromedriver_linux64.zip
http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip
- unzip -qq /tmp/chromedriver_linux64.zip -d /opt/chromedriver
- chmod +x /opt/chromedriver/chromedriver