Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
JFU-NAVA-PBC committed Dec 13, 2024
1 parent fe62763 commit 27fb616
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 19 deletions.
15 changes: 0 additions & 15 deletions Dockerfiles/Dockerfile.selenium-jenkins-python311-chromium

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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"
}
}

Expand Down Expand Up @@ -59,6 +59,14 @@ pipeline {
}
}

stage("CHECK chromedriver 126") {
steps{
sh """
/usr/local/bin/chromedriver
"""
}
}

stage("CHECK Flake8 Python Lint/Style") {
steps{
sh """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 27fb616

Please sign in to comment.