Skip to content
Snippets Groups Projects
Commit 98e24259 authored by tuhe's avatar tuhe
Browse files

CICD

parent c3f1a110
Branches
No related tags found
No related merge requests found
Pipeline #8692 failed
...@@ -7,19 +7,19 @@ image: ubuntu:latest ...@@ -7,19 +7,19 @@ image: ubuntu:latest
before_script: before_script:
- apt-get update -y - apt-get update -y
- apt install -y python3-pip python3.10 python-is-python3 - apt install -y python3-pip python3.10 python-is-python3
- apt install -y xvfb libssl-dev openssl wget - apt install -y xvfb libssl-dev openssl wget firefox
- openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes -batch - openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes -batch
# - sudo -H pip3 install bpython selenium # - sudo -H pip3 install bpython selenium
- apt-get update # && apt-get upgrade --assume-yes # - apt-get update # && apt-get upgrade --assume-yes
- apt-get install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils --assume-yes # - apt-get install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils --assume-yes
- wget -nv -O ~/FirefoxSetup.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64" # - wget -nv -O ~/FirefoxSetup.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64"
- tar xjf ~/FirefoxSetup.tar.bz2 -C /opt/ # - tar xjf ~/FirefoxSetup.tar.bz2 -C /opt/
- ln -s /opt/firefox/firefox /usr/lib/firefox # - ln -s /opt/firefox/firefox /usr/lib/firefox
- export PATH=$PATH:/opt/firefox/ # - export PATH=$PATH:/opt/firefox/
- wget -nv -O ~/geckodriver.tar.gz "https://github.com/mozilla/geckodriver/releases/download/v0.28.0/geckodriver-v0.28.0-linux64.tar.gz" # - wget -nv -O ~/geckodriver.tar.gz "https://github.com/mozilla/geckodriver/releases/download/v0.28.0/geckodriver-v0.28.0-linux64.tar.gz"
- tar -zxvf ~/geckodriver.tar.gz -C /opt/ # - tar -zxvf ~/geckodriver.tar.gz -C /opt/
- export PATH=$PATH:/opt/ # - export PATH=$PATH:/opt/
- pip install -r requirements.txt - pip install -r requirements.txt
# - export GECKO_DRIVER_VERSION='v0.31.0' # - export GECKO_DRIVER_VERSION='v0.31.0'
......
...@@ -319,6 +319,8 @@ def start_localhost(flow_manager=None): ...@@ -319,6 +319,8 @@ def start_localhost(flow_manager=None):
if __name__ == '__main__': if __name__ == '__main__':
print("Hello world") print("Hello world")
lc = LearnConfig() lc = LearnConfig()
# file: flow_managers.py # file: flow_managers.py
......
...@@ -5,6 +5,14 @@ if __name__ == "__main__": ...@@ -5,6 +5,14 @@ if __name__ == "__main__":
with open(os.path.dirname(__file__) + "/password.txt", 'r') as f: with open(os.path.dirname(__file__) + "/password.txt", 'r') as f:
password = f.read() password = f.read()
print("The learn password is", password) print("The learn password is", password)
from splinter import Browser
print("Making browser")
browser = Browser('firefox')
print("Done")
browser.visit('http://google.com')
print(browser.html)
if not os.path.isdir(pages): if not os.path.isdir(pages):
os.mkdir(pages) os.mkdir(pages)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment