diff --git a/Dockerfiles/Dockerfile.selenium-jenkins-python311-chromium b/Dockerfiles/Dockerfile.selenium-jenkins-python311-chromium deleted file mode 100644 index c7c7c0ae6..000000000 --- a/Dockerfiles/Dockerfile.selenium-jenkins-python311-chromium +++ /dev/null @@ -1,15 +0,0 @@ -FROM --platform=linux/amd64 selenium/standalone-chromium - -ENV PYTHONUNBUFFERED 1 -USER root -RUN apt-get update ; apt-get install -yq python3 python3-venv -RUN ln -s /usr/bin/python3 /usr/local/bin/python - -USER seluser -COPY requirements.dev.txt . -RUN python -m venv /tmp/venv -RUN . /tmp/venv/bin/activate -ENV PATH="/tmp/venv/bin:${PATH}" -RUN pip install --upgrade pip pip-tools setuptools -RUN pip install psycopg2-binary cffi -RUN pip install -r requirements.dev.txt diff --git a/Dockerfiles/Dockerfile.selenium-jenkins-python311-plus-chromedriver126 b/Dockerfiles/Dockerfile.selenium-jenkins-python311-plus-chromedriver126 new file mode 100644 index 000000000..7c85740fe --- /dev/null +++ b/Dockerfiles/Dockerfile.selenium-jenkins-python311-plus-chromedriver126 @@ -0,0 +1,23 @@ +FROM --platform=linux/amd64 python:3.11 +# For build CBC Jenkins job ECR image +ENV PYTHONUNBUFFERED 1 + +RUN mkdir /code +ADD . /code/ +WORKDIR /code + +RUN pip install --upgrade pip +RUN apt-get update && apt-get install -yq git unzip curl +# Install Chrome for Selenium +RUN curl https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /chrome.deb \ + && dpkg -i /chrome.deb || apt-get install -yf \ + && rm /chrome.deb +# Install chromedriver for Selenium +# RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip \ +# && unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/ \ +# && chmod +x /usr/local/bin/chromedriver + +# hard code the zip URL here since `curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` still points to 114 which is out of date +RUN wget -O /tmp/chromedriver.zip https://storage.googleapis.com/chrome-for-testing-public/126.0.6478.55/linux64/chromedriver-linux64.zip \ + && unzip -p /tmp/chromedriver.zip chromedriver-linux64/chromedriver > /usr/local/bin/chromedriver \ + && chmod +x /usr/local/bin/chromedriver diff --git a/Jenkinsfiles/Jenkinsfile.cbc-run-multi-pr-checks-w-selenium-chromium b/Jenkinsfiles/Jenkinsfile.cbc-run-multi-pr-checks-w-selenium-chromium index f6f897458..b1de02fc5 100644 --- a/Jenkinsfiles/Jenkinsfile.cbc-run-multi-pr-checks-w-selenium-chromium +++ b/Jenkinsfiles/Jenkinsfile.cbc-run-multi-pr-checks-w-selenium-chromium @@ -1,8 +1,8 @@ pipeline { agent { kubernetes { - defaultContainer "bb2-cbc-build-selenium-python311" - yamlFile "Jenkinsfiles/cbc-pod-deployment-config-w-selenium-p311.yaml" + defaultContainer "bb2-cbc-build-selenium-python311-chromedriver126" + yamlFile "Jenkinsfiles/cbc-pod-deployment-config-w-selenium-p311-chromium.yaml" } } @@ -59,6 +59,14 @@ pipeline { } } + stage("CHECK chromedriver 126") { + steps{ + sh """ + /usr/local/bin/chromedriver + """ + } + } + stage("CHECK Flake8 Python Lint/Style") { steps{ sh """ diff --git a/Jenkinsfiles/cbc-pod-deployment-config-w-selenium-p311-chromium.yaml b/Jenkinsfiles/cbc-pod-deployment-config-w-selenium-p311-chromium.yaml index 016438567..645b27a5b 100644 --- a/Jenkinsfiles/cbc-pod-deployment-config-w-selenium-p311-chromium.yaml +++ b/Jenkinsfiles/cbc-pod-deployment-config-w-selenium-p311-chromium.yaml @@ -2,8 +2,8 @@ apiVersion: v1 kind: Pod spec: containers: - - name: bb2-cbc-build-selenium-python311-chromium - image: "public.ecr.aws/f5g8o1y9/bb2-cbc-build-selenium-python311-chromium:latest" + - name: bb2-cbc-build-selenium-python311-chromedriver126 + image: "public.ecr.aws/f5g8o1y9/bb2-cbc-build-selenium-python311-chromedriver126:latest" tty: true command: ["tail", "-f"] imagePullPolicy: Always