Skip to content

Commit 6ae222f

Browse files
authored
recover Dockerfile.selenium-jenkins-python311-plus-chromedriver and remove unused other dockerfiles (#1280)
1 parent f15a3e5 commit 6ae222f

File tree

4 files changed

+32
-47
lines changed

4 files changed

+32
-47
lines changed

Dockerfiles/Dockerfile.selenium-jenkins

Lines changed: 0 additions & 22 deletions
This file was deleted.

Dockerfiles/Dockerfile.selenium-jenkins-python311

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM --platform=linux/amd64 python:3.11
2+
# For build CBC Jenkins job ECR image
3+
ENV PYTHONUNBUFFERED 1
4+
5+
RUN mkdir /code
6+
ADD . /code/
7+
WORKDIR /code
8+
9+
RUN pip install --upgrade pip
10+
RUN apt-get update && apt-get install -yq git unzip curl
11+
12+
# Install Chrome for Selenium
13+
RUN curl https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /chrome.deb \
14+
&& dpkg -i /chrome.deb || apt-get install -yf \
15+
&& rm /chrome.deb
16+
17+
# Install chromedriver for Selenium: keep the previous chrome driver install code for reference
18+
# RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip \
19+
# && unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/ \
20+
# && chmod +x /usr/local/bin/chromedriver
21+
22+
# hard code the zip URL here since `curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` still points to 114 which is out of date
23+
# 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
24+
# drivers.
25+
RUN wget -O /tmp/chromedriver.zip https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.108/linux64/chromedriver-linux64.zip \
26+
&& unzip -p /tmp/chromedriver.zip chromedriver-linux64/chromedriver > /usr/local/bin/chromedriver \
27+
&& chmod +x /usr/local/bin/chromedriver

Dockerfiles/readme.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
# Build, Tag, and Publish integration and selenium tests ECR iamge
1+
# Build, Tag, and Publish integration and selenium tests ECR image - used by github CI check
22

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

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

0 commit comments

Comments
 (0)