Skip to content

Commit

Permalink
Add repo file for Containerfile.ci
Browse files Browse the repository at this point in the history
Add extra repos to RUNNER stage
which are required to install google-chrome to run UI tests

Signed-off-by: Rabin Yasharzadehe <[email protected]>
  • Loading branch information
rabin-io committed Nov 16, 2023
1 parent 8977201 commit 81b6e06
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Docker_files/ocsci_container/Containerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,21 @@ RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/s
&& mv kubectl /usr/local/bin/

RUN curl https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz | tar -C /usr/local/bin -zxvf - oc
COPY /Docker_files/ocsci_container/centos.repo /etc/yum.repos.d/
COPY /Docker_files/ocsci_container/google-chrome.repo /etc/yum.repos.d/

RUN dnf install -y --nodocs python38 git jq rsync make \
# Install EPEL repos
# RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-8.noarch.rpm

RUN dnf install -y --nodocs --setopt=install_weak_deps=False python38 git jq rsync make google-chrome \
&& dnf clean all \
&& rm -rf /var/cache/yum /var/cache/dnf /var/lib/dnf/repos /var/log/dnf.librepo.log /var/log/dnf.log /var/log/dnf.rpm.log /var/log/hawkey.log /var/cache/ldconfig \
&& curl -sL https://github.com/mikefarah/yq/releases/download/v4.32.2/yq_linux_amd64.tar.gz | tar -C /usr/local/bin -zxvf - ./yq_linux_amd64 \
&& mv -v /usr/local/bin/yq_linux_amd64 /usr/local/bin/yq

COPY --from=BUILDER "${OCS_CI_DIR}" "${OCS_CI_DIR}"

RUN groupadd -r tester && useradd -r -g tester tester
USER tester

CMD [ "run-ci", "--help" ]
13 changes: 13 additions & 0 deletions Docker_files/ocsci_container/centos.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[appstream]
name=CentOS-$releasever - AppStream
baseurl=http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-Official

[baseos]
name=CentOS-$releasever - BaseOS
baseurl=http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-Official
6 changes: 6 additions & 0 deletions Docker_files/ocsci_container/google-chrome.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

0 comments on commit 81b6e06

Please sign in to comment.