Skip to content

Commit

Permalink
Fix Chrome and tests on CentOS 7
Browse files Browse the repository at this point in the history
* CentOS 7 is EOL and now needs vault.centos.org for mirrors
* Chrome 126 and later no longer support CentOS 7, pin to 125
  • Loading branch information
glin committed Jul 29, 2024
1 parent 4bf1ffc commit a20ca09
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docker/centos7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM centos:7

# Use vault.centos.org since CentOS 7 is EOL and the official mirrors are no longer available
RUN sed -i -e 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/*

RUN yum update -y -q

# Install jq
Expand Down
29 changes: 27 additions & 2 deletions rules/chrome.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@
"constraints": [
{
"os": "linux",
"distribution": "centos"
"distribution": "centos",
"versions": ["8"]
},
{
"os": "linux",
"distribution": "rockylinux"
},
{
"os": "linux",
"distribution": "redhat"
"distribution": "redhat",
"versions": ["8"]
},
{
"os": "linux",
Expand All @@ -54,6 +56,29 @@
}
]
},
{
"pre_install": [
{ "command": "yum install -y which" },
{ "command": "[ $(which google-chrome) ] || curl -fsSL -o /tmp/google-chrome.rpm https://dl.google.com/linux/chrome/rpm/stable/x86_64/google-chrome-stable-125.0.6422.141-1.x86_64.rpm" },
{ "command": "[ $(which google-chrome) ] || yum install -y /tmp/google-chrome.rpm" }
],
"packages": [],
"post_install": [
{ "command": "rm -f /tmp/google-chrome.rpm" }
],
"constraints": [
{
"os": "linux",
"distribution": "centos",
"versions": ["7"]
},
{
"os": "linux",
"distribution": "redhat",
"versions": ["7"]
}
]
},
{
"packages": ["chromium"],
"constraints": [
Expand Down

0 comments on commit a20ca09

Please sign in to comment.