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:
|
- project:
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
|
- openstack-tox-bashate
|
||||||
- devstack-plugin-container-dsvm
|
- devstack-plugin-container-dsvm
|
||||||
- devstack-plugin-container-k8s:
|
- devstack-plugin-container-k8s:
|
||||||
voting: false
|
voting: false
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
|
- openstack-tox-bashate
|
||||||
- devstack-plugin-container-dsvm
|
- devstack-plugin-container-dsvm
|
||||||
|
@ -77,7 +77,8 @@ function configure_cni_plugins {
|
|||||||
echo "Configuring CNI plugins"
|
echo "Configuring CNI plugins"
|
||||||
|
|
||||||
for plugin in ${CNI_PLUGINS_INSTALL_PLUGINS//,/ }; do
|
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
|
if [ $source_config_file ]; then
|
||||||
echo "Found config file for plugin: $plugin"
|
echo "Found config file for plugin: $plugin"
|
||||||
sudo install -o "$STACK_USER" -m 0664 -t "$CNI_PLUGINS_CONF_DIR" -D \
|
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 {
|
function check_crio {
|
||||||
if is_ubuntu; then
|
if is_ubuntu; then
|
||||||
dpkg -l | grep crio-o > /dev/null 2>&1
|
dpkg -l | grep crio-o > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
# TODO: CentOS/Fedora support.
|
# TODO: CentOS/Fedora support.
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +40,8 @@ function install_crio {
|
|||||||
|
|
||||||
local lsb_dist=${os_VENDOR,,}
|
local lsb_dist=${os_VENDOR,,}
|
||||||
local dist_version=${os_CODENAME}
|
local dist_version=${os_CODENAME}
|
||||||
local arch=$(dpkg --print-architecture)
|
local arch
|
||||||
|
arch=$(dpkg --print-architecture)
|
||||||
if is_ubuntu; then
|
if is_ubuntu; then
|
||||||
apt_get install apt-transport-https ca-certificates software-properties-common
|
apt_get install apt-transport-https ca-certificates software-properties-common
|
||||||
sudo add-apt-repository -y ppa:projectatomic/ppa
|
sudo add-apt-repository -y ppa:projectatomic/ppa
|
||||||
|
@ -42,9 +42,9 @@ CONTAINERD_CONF=$CONTAINERD_CONF_DIR/config.toml
|
|||||||
|
|
||||||
function check_docker {
|
function check_docker {
|
||||||
if is_ubuntu; then
|
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
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,7 +55,8 @@ function install_docker {
|
|||||||
|
|
||||||
local lsb_dist=${os_VENDOR,,}
|
local lsb_dist=${os_VENDOR,,}
|
||||||
local dist_version=${os_CODENAME}
|
local dist_version=${os_CODENAME}
|
||||||
local arch=$(dpkg --print-architecture)
|
local arch
|
||||||
|
arch=$(dpkg --print-architecture)
|
||||||
if is_ubuntu; then
|
if is_ubuntu; then
|
||||||
if [[ ${dist_version} == 'trusty' ]]; 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
|
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 {
|
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
|
cat <<EOF | sudo tee $kubeadm_config_file >/dev/null
|
||||||
apiVersion: kubeadm.k8s.io/v1beta1
|
apiVersion: kubeadm.k8s.io/v1beta1
|
||||||
kind: ClusterConfiguration
|
kind: ClusterConfiguration
|
||||||
@ -96,7 +97,8 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
function kubeadm_join {
|
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
|
cat <<EOF | sudo tee $kubeadm_config_file >/dev/null
|
||||||
apiVersion: kubeadm.k8s.io/v1beta1
|
apiVersion: kubeadm.k8s.io/v1beta1
|
||||||
kind: JoinConfiguration
|
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…
x
Reference in New Issue
Block a user