Build osh-selenium from Ubuntu Jammy

Change-Id: I5d469e8076dda3bcd3261162a43a1085c8756ccd
This commit is contained in:
Vladimir Kozhukalov 2023-10-26 13:54:53 -05:00
parent 667f4b1d23
commit 892d562d7e
7 changed files with 27 additions and 61 deletions

2
.gitignore vendored
View File

@ -59,3 +59,5 @@ ChangeLog
# Files created by releasenotes build
releasenotes/build
.vscode

View File

@ -1,21 +0,0 @@
ARG FROM=opensuse/leap:15.0
FROM ${FROM}
LABEL maintainer="cloud-devel@suse.com"
COPY linux_signing_key.pub /tmp/
RUN set -ex ;\
rpm --import /tmp/linux_signing_key.pub ;\
rm /tmp/linux_signing_key.pub ;\
zypper --non-interactive addrepo http://dl.google.com/linux/chrome/rpm/stable/x86_64 google_chrome ;\
zypper --non-interactive refresh ;\
zypper --non-interactive up -y ;\
zypper --non-interactive install -y \
python-pip \
unzip \
wget \
google-chrome-stable ;\
/usr/bin/pip install \
selenium ;\
wget --directory-prefix=/tmp/ https://chromedriver.storage.googleapis.com/2.44/chromedriver_linux64.zip ;\
unzip /tmp/chromedriver_linux64.zip -d /etc/selenium ;\
zypper clean -a

View File

@ -1,18 +0,0 @@
ARG FROM=docker.io/ubuntu:bionic
FROM ${FROM}
RUN set -xe; \
apt-get -y update; \
apt-get install --no-install-recommends -y python3 python3-pip unzip wget gnupg; \
python3 -m pip install --upgrade pip; \
python3 -m pip install selenium; \
wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_88.0.4324.182-1_amd64.deb; \
apt install -y /tmp/chrome.deb; \
# We'll keep it here for later to be able to easily remove chrome pinning \
CHROME_VER=$(dpkg -s google-chrome-stable | grep -Po '(?<=^Version: ).*' | awk -F'.' '{print $1"."$2"."}'); \
wget -O /tmp/index.xml https://chromedriver.storage.googleapis.com/; \
DRIVER_PATH=$(grep -Po "(?<=<Key>)${CHROME_VER}[^<]*?chromedriver_linux64\.zip(?=</Key>)" /tmp/index.xml | tail -1); \
wget --directory-prefix=/tmp/ https://chromedriver.storage.googleapis.com/${DRIVER_PATH}; \
unzip /tmp/chromedriver_linux64.zip -d /etc/selenium; \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/*

View File

@ -6,9 +6,14 @@ cd ${SCRIPT_DIR}/..
IMAGE="osh-selenium"
VERSION=${VERSION:-latest}
DISTRO=${DISTRO:-ubuntu_focal}
DISTRO=${DISTRO:-ubuntu}
DISTRO_VERSION=${DISTRO_VERSION:-focal}
REGISTRY_URI=${REGISTRY_URI:-"openstackhelm/"}
EXTRA_TAG_INFO=${EXTRA_TAG_INFO:-""}
docker build -f ${IMAGE}/Dockerfile.${DISTRO} --network=host -t ${REGISTRY_URI}${IMAGE}:${VERSION}-${DISTRO}${EXTRA_TAG_INFO} ${extra_build_args} ${IMAGE}
docker build -f ${IMAGE}/Dockerfile.${DISTRO} \
--network=host \
-t ${REGISTRY_URI}${IMAGE}:${VERSION}-${DISTRO}_${DISTRO_VERSION}${EXTRA_TAG_INFO} \
--build-arg="FROM=${DISTRO}:${DISTRO_VERSION}" \
${extra_build_args} ${IMAGE}
cd -

View File

@ -31,7 +31,7 @@
- openstack-helm-images-cinder-zed-ubuntu_focal
# - openstack-helm-images-compute-kit-2023-1-ubuntu_focal
# - openstack-helm-images-cinder-2023-1-ubuntu_focal
- openstack-helm-images-horizon-wallaby-ubuntu_focal
- openstack-helm-images-horizon-2023-1-ubuntu_jammy
gate:
jobs:
- openstack-helm-images-buildset-registry
@ -49,7 +49,7 @@
- openstack-helm-images-cinder-zed-ubuntu_focal
# - openstack-helm-images-compute-kit-2023-1-ubuntu_focal
# - openstack-helm-images-cinder-2023-1-ubuntu_focal
- openstack-helm-images-horizon-wallaby-ubuntu_focal
- openstack-helm-images-horizon-2023-1-ubuntu_jammy
periodic-weekly:
jobs:
- openstack-helm-images-buildset-registry
@ -67,7 +67,7 @@
- openstack-helm-images-cinder-zed-ubuntu_focal
# - openstack-helm-images-compute-kit-2023-1-ubuntu_focal
# - openstack-helm-images-cinder-2023-1-ubuntu_focal
- openstack-helm-images-horizon-wallaby-ubuntu_focal
- openstack-helm-images-horizon-2023-1-ubuntu_jammy
templates:
- publish-openstack-docs-pti
- release-notes-jobs-python3
@ -216,17 +216,17 @@
- zuul.d/osh-selenium.yaml
- job:
name: openstack-helm-images-horizon-wallaby-ubuntu_focal
parent: openstack-helm-horizon-wallaby-ubuntu_focal
name: openstack-helm-images-horizon-2023-1-ubuntu_jammy
parent: openstack-helm-horizon-2023-1-ubuntu_jammy
match-on-config-updates: false
dependencies:
- name: openstack-helm-images-build-osh-selenium
soft: true
- name: openstack-helm-images-build-openstack-loci-wallaby-ubuntu_focal
- name: openstack-helm-images-build-openstack-loci-2023-1-ubuntu_jammy
soft: true
- name: openstack-helm-images-upload-osh-selenium
soft: true
- name: openstack-helm-images-upload-openstack-loci-wallaby-ubuntu_focal
- name: openstack-helm-images-upload-openstack-loci-2023-1-ubuntu_jammy
soft: true
files:
- osh-selenium/.*

View File

@ -38,24 +38,22 @@
vars: &osh-selenium_vars
currentdate: "{{ now(utc=True,fmt='%Y%m%d') }}"
docker_images:
#- context: osh-selenium
# repository: openstackhelm/osh-selenium
# dockerfile: Dockerfile.ubuntu_bionic
# tags:
# - latest-ubuntu_bionic
# - "ubuntu_bionic-{{ currentdate }}"
- context: osh-selenium
repository: openstackhelm/osh-selenium
dockerfile: Dockerfile.ubuntu_focal
dockerfile: Dockerfile.ubuntu
build_args:
- "FROM=docker.io/ubuntu:focal"
tags:
- latest-ubuntu_focal
- "ubuntu_focal-{{ currentdate }}"
#- context: osh-selenium
# repository: openstackhelm/osh-selenium
# dockerfile: Dockerfile.opensuse_15
# tags:
# - latest-opensuse_15
# - "opensuse_15-{{ currentdate }}"
- context: osh-selenium
repository: openstackhelm/osh-selenium
dockerfile: Dockerfile.ubuntu
build_args:
- "FROM=docker.io/ubuntu:jammy"
tags:
- latest-ubuntu_jammy
- "ubuntu_jammy-{{ currentdate }}"
files: &osh-selenium_files
- osh-selenium/.*
- zuul.d/osh-selenium.yaml