Skip to content

Commit

Permalink
recover Dockerfile.selenium-jenkins-python311-plus-chromedriver and r…
Browse files Browse the repository at this point in the history
…emove unused other dockerfiles (#1280)
  • Loading branch information
JFU-NAVA-PBC authored Jan 7, 2025
1 parent f15a3e5 commit 6ae222f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 47 deletions.
22 changes: 0 additions & 22 deletions Dockerfiles/Dockerfile.selenium-jenkins

This file was deleted.

18 changes: 0 additions & 18 deletions Dockerfiles/Dockerfile.selenium-jenkins-python311

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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: keep the previous chrome driver install code for reference
# 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
# this is the current way google publish the chrome drivers, going forward, need to make changes to keep up with the way google publish the
# drivers.
RUN wget -O /tmp/chromedriver.zip https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.108/linux64/chromedriver-linux64.zip \
&& unzip -p /tmp/chromedriver.zip chromedriver-linux64/chromedriver > /usr/local/bin/chromedriver \
&& chmod +x /usr/local/bin/chromedriver
12 changes: 5 additions & 7 deletions Dockerfiles/readme.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# Build, Tag, and Publish integration and selenium tests ECR iamge
# Build, Tag, and Publish integration and selenium tests ECR image - used by github CI check

Go to BB2 local repo base directory and do the followings (assume aws cli installed and configured properly):

```
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/f5g8o1y9
cd <bb2-local-repo-base-dir>/Dockerfiles
docker build -f Dockerfile.selenium-jenkins -t bb2-cbc-build-selenium .
docker tag bb2-cbc-build-selenium:latest public.ecr.aws/f5g8o1y9/bb2-cbc-build-selenium:latest
docker push public.ecr.aws/f5g8o1y9/bb2-cbc-build-selenium:latest
```
docker build -f Dockerfile.selenium-jenkins-python311-plus-chromedriver -t bb2-cbc-build-selenium-python311-chromium .
docker tag bb2-cbc-build-selenium-python311-chromium:latest public.ecr.aws/f5g8o1y9/bb2-cbc-build-selenium-python311-chromium:latest
docker push public.ecr.aws/f5g8o1y9/bb2-cbc-build-selenium-python311-chromium:latest
```

0 comments on commit 6ae222f

Please sign in to comment.