Created
August 30, 2023 05:16
-
-
Save andrewpsp/47f411e9a4991cba712034f420d172ae to your computer and use it in GitHub Desktop.
Build of the Dockerfile for the webscript driver environment certififcation condiitons.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from selenium import webdriver | |
def import os | |
from selenium import webdriver | |
def business_object_certification_handle(req): | |
options = webdriver.ChromeOptions() | |
#To be utlized with FaaS models | |
options.add_argument('--headless') | |
options.add_argument('--no-sandbox') | |
options.add_argument('--disable-dev-shm-usage') | |
# TODO dynamic array of maps to webdriver browsers | |
driver = webdriver.Chrome(chrome_options=options) | |
# update domain variable with your domain to certify | |
domain = 'cnn.com' | |
try: | |
# Navigate to the index of the assets and components | |
driver.get(f"https://{domain}") | |
# Check if the title of the page is SSL as expected | |
assert {domain} in driver.title | |
finally: | |
driver.quit() | |
return "view report at entercloud.info/Devbuild" | |
print("1 of 1 complete") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openfaas/classic-watchdog:latest as watchdog | |
FROM selenium/standalone-chrome:latest | |
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog | |
RUN chmod +x /usr/bin/fwatchdog | |
COPY business_object_certification.py . | |
CMD ["fwatchdog"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment