Add image for Selenium to be used in helm tests
This adds an image that includes Selenium and the google chrome headless driver for use in helm tests for charts with a GUI Change-Id: Id487bff5df6efe6e2d264f766260879c6a95c1aa Signed-off-by: Steve Wilkerson <sw5822@att.com>
This commit is contained in:

committed by
Steve Wilkerson

parent
4b52f463ea
commit
ef5c3f72e6
16
osh-selenium/Dockerfile.ubuntu_xenial
Normal file
16
osh-selenium/Dockerfile.ubuntu_xenial
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM docker.io/ubuntu:xenial
|
||||
|
||||
RUN apt-get -y update \
|
||||
&& apt-get install -y python-pip unzip wget
|
||||
|
||||
RUN /usr/bin/pip install selenium
|
||||
|
||||
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
||||
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
|
||||
&& wget --directory-prefix=/tmp/ https://chromedriver.storage.googleapis.com/2.44/chromedriver_linux64.zip \
|
||||
&& unzip /tmp/chromedriver_linux64.zip -d /etc/selenium
|
||||
|
||||
RUN apt-get -y update \
|
||||
&& apt-get install -y google-chrome-stable \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
14
osh-selenium/build.sh
Normal file
14
osh-selenium/build.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
SCRIPT=`realpath $0`
|
||||
SCRIPT_DIR=`dirname ${SCRIPT}`
|
||||
## Only build from main folder
|
||||
cd ${SCRIPT_DIR}/..
|
||||
|
||||
IMAGE="osh-selenium"
|
||||
VERSION=${VERSION:-latest}
|
||||
DISTRO=${DISTRO:-ubuntu_xenial}
|
||||
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}
|
||||
|
||||
cd -
|
57
zuul.d/osh-selenium.yaml
Normal file
57
zuul.d/osh-selenium.yaml
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
# Copyright 2019 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- openstack-helm-images-build-osh-selenium
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-helm-images-upload-osh-selenium
|
||||
promote:
|
||||
jobs:
|
||||
- openstack-helm-images-promote-osh-selenium
|
||||
periodic:
|
||||
jobs:
|
||||
- openstack-helm-images-build-osh-selenium
|
||||
|
||||
- job:
|
||||
name: openstack-helm-images-build-osh-selenium
|
||||
parent: openstack-helm-images-build
|
||||
description: Build selenium image with chrome headless driver
|
||||
vars: &osh-selenium_vars
|
||||
docker_images:
|
||||
- context: osh-selenium
|
||||
repository: openstackhelm/osh-selenium
|
||||
dockerfile: Dockerfile.ubuntu_xenial
|
||||
tags:
|
||||
- latest-ubuntu_xenial
|
||||
files: &osh-selenium_files
|
||||
- osh-selenium/.*
|
||||
- zuul.d/osh-selenium.yaml
|
||||
|
||||
- job:
|
||||
name: openstack-helm-images-upload-osh-selenium
|
||||
parent: openstack-helm-images-upload
|
||||
description: Build and upload selenium image with chrome headless driver
|
||||
vars: *osh-selenium_vars
|
||||
files: *osh-selenium_files
|
||||
|
||||
- job:
|
||||
name: openstack-helm-images-promote-osh-selenium
|
||||
parent: openstack-helm-images-promote
|
||||
description: Promote a previously published selenium image with chrome headless driver.
|
||||
vars: *osh-selenium_vars
|
||||
files: *osh-selenium_files
|
Reference in New Issue
Block a user