Add bashate job
Change-Id: I74d09678958ad5e5dec4cbacb450973a31fcf9ba
This commit is contained in:
parent
401029e617
commit
129c4e89ee
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.tox
|
@ -53,9 +53,11 @@
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- openstack-tox-bashate
|
||||
- devstack-plugin-container-dsvm
|
||||
- devstack-plugin-container-k8s:
|
||||
voting: false
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-bashate
|
||||
- devstack-plugin-container-dsvm
|
||||
|
@ -77,7 +77,8 @@ function configure_cni_plugins {
|
||||
echo "Configuring CNI plugins"
|
||||
|
||||
for plugin in ${CNI_PLUGINS_INSTALL_PLUGINS//,/ }; do
|
||||
local source_config_file=$(ls ${CNI_PLUGINS_CONF_SOURCE_DIR}/*${plugin}.conf 2> /dev/null)
|
||||
local source_config_file
|
||||
source_config_file=$(ls ${CNI_PLUGINS_CONF_SOURCE_DIR}/*${plugin}.conf 2> /dev/null)
|
||||
if [ $source_config_file ]; then
|
||||
echo "Found config file for plugin: $plugin"
|
||||
sudo install -o "$STACK_USER" -m 0664 -t "$CNI_PLUGINS_CONF_DIR" -D \
|
||||
|
@ -26,10 +26,10 @@ CRIO_ENGINE_SOCKET_FILE=${CRIO_ENGINE_SOCKET_FILE:-/var/run/crio/crio.sock}
|
||||
|
||||
function check_crio {
|
||||
if is_ubuntu; then
|
||||
dpkg -l | grep crio-o > /dev/null 2>&1
|
||||
dpkg -l | grep crio-o > /dev/null 2>&1
|
||||
else
|
||||
false
|
||||
# TODO: CentOS/Fedora support.
|
||||
false
|
||||
# TODO: CentOS/Fedora support.
|
||||
fi
|
||||
}
|
||||
|
||||
@ -40,7 +40,8 @@ function install_crio {
|
||||
|
||||
local lsb_dist=${os_VENDOR,,}
|
||||
local dist_version=${os_CODENAME}
|
||||
local arch=$(dpkg --print-architecture)
|
||||
local arch
|
||||
arch=$(dpkg --print-architecture)
|
||||
if is_ubuntu; then
|
||||
apt_get install apt-transport-https ca-certificates software-properties-common
|
||||
sudo add-apt-repository -y ppa:projectatomic/ppa
|
||||
|
@ -42,9 +42,9 @@ CONTAINERD_CONF=$CONTAINERD_CONF_DIR/config.toml
|
||||
|
||||
function check_docker {
|
||||
if is_ubuntu; then
|
||||
dpkg -s docker-engine > /dev/null 2>&1 || dpkg -s docker-ce > /dev/null 2>&1
|
||||
dpkg -s docker-engine > /dev/null 2>&1 || dpkg -s docker-ce > /dev/null 2>&1
|
||||
else
|
||||
rpm -q docker-engine > /dev/null 2>&1 || rpm -q docker > /dev/null 2>&1 || rpm -q docker-ce > /dev/null 2>&1
|
||||
rpm -q docker-engine > /dev/null 2>&1 || rpm -q docker > /dev/null 2>&1 || rpm -q docker-ce > /dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
@ -55,7 +55,8 @@ function install_docker {
|
||||
|
||||
local lsb_dist=${os_VENDOR,,}
|
||||
local dist_version=${os_CODENAME}
|
||||
local arch=$(dpkg --print-architecture)
|
||||
local arch
|
||||
arch=$(dpkg --print-architecture)
|
||||
if is_ubuntu; then
|
||||
if [[ ${dist_version} == 'trusty' ]]; then
|
||||
if uname -r | grep -q -- '-generic' && dpkg -l 'linux-image-*-generic' | grep -qE '^ii|^hi' 2>/dev/null; then
|
||||
|
@ -58,7 +58,8 @@ function install_kubeadm {
|
||||
}
|
||||
|
||||
function kubeadm_init {
|
||||
local kubeadm_config_file=$(mktemp)
|
||||
local kubeadm_config_file
|
||||
kubeadm_config_file=$(mktemp)
|
||||
cat <<EOF | sudo tee $kubeadm_config_file >/dev/null
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
kind: ClusterConfiguration
|
||||
@ -96,7 +97,8 @@ EOF
|
||||
}
|
||||
|
||||
function kubeadm_join {
|
||||
local kubeadm_config_file=$(mktemp)
|
||||
local kubeadm_config_file
|
||||
kubeadm_config_file=$(mktemp)
|
||||
cat <<EOF | sudo tee $kubeadm_config_file >/dev/null
|
||||
apiVersion: kubeadm.k8s.io/v1beta1
|
||||
kind: JoinConfiguration
|
||||
|
35
tox.ini
Normal file
35
tox.ini
Normal file
@ -0,0 +1,35 @@
|
||||
[tox]
|
||||
minversion = 1.6
|
||||
skipsdist = True
|
||||
envlist = bashate
|
||||
|
||||
[testenv]
|
||||
usedevelop = False
|
||||
install_command = pip install {opts} {packages}
|
||||
|
||||
[testenv:bashate]
|
||||
basepython = python3
|
||||
# if you want to test out some changes you have made to bashate
|
||||
# against devstack, just set BASHATE_INSTALL_PATH=/path/... to your
|
||||
# modified bashate tree
|
||||
deps =
|
||||
{env:BASHATE_INSTALL_PATH:bashate==0.5.1}
|
||||
whitelist_externals = bash
|
||||
commands = bash -c "find {toxinidir} \
|
||||
-not \( -type d -name .?\* -prune \) \
|
||||
-not \( -type d -name doc -prune \) \
|
||||
-not \( -type f -name localrc -prune \) \
|
||||
-type f \
|
||||
-not -name \*~ \
|
||||
-not -name \*.md \
|
||||
-not -name stack-screenrc \
|
||||
-not -name \*.orig \
|
||||
-not -name \*.rej \
|
||||
\( \
|
||||
-name \*.sh -or \
|
||||
-name \*rc -or \
|
||||
-name functions\* -or \
|
||||
-wholename \*/inc/\* -or \
|
||||
-wholename \*/lib/\* \
|
||||
\) \
|
||||
-print0 | xargs -0 bashate -v -iE006 -eE005,E042"
|
Loading…
Reference in New Issue
Block a user