Skip to content

Commit

Permalink
Merge pull request #1281 from Ch3LL/merge_stable
Browse files Browse the repository at this point in the history
[stable] Merge develop into stable for new release 2018.08.15
  • Loading branch information
gtmanfred authored Aug 15, 2018
2 parents 36f8430 + de93938 commit 096f111
Show file tree
Hide file tree
Showing 23 changed files with 225 additions and 2,164 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@

# Pycharm
.idea

# test-kitchen
.bundle
Gemfile.lock
114 changes: 114 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
driver:
name: docker
use_sudo: false
hostname: salt
privileged: true
username: kitchen
cap_add:
- sys_admin
disable_upstart: false

provisioner:
name: salt_solo
salt_install: bootstrap
salt_bootstrap_url: bootstrap-salt.sh
salt_bootstrap_options: -MPfq git %s
install_after_init_environment: true
log_level: info
sudo: true
require_chef: false
formula: tests
state_top:
base:
'*':
- tests.accept_key

platforms:
- name: fedora
driver_config:
image: fedora:latest
run_command: /usr/lib/systemd/systemd
- name: centos-7
driver_config:
run_command: /usr/lib/systemd/systemd
- name: centos-6
driver_config:
run_command: /sbin/init
provision_command:
- yum install -y upstart
provisioner:
salt_bootstrap_options: -MPfq -y -x python2.7 git %s
- name: amazon-1
driver_config:
image: amazonlinux:1
platform: rhel
run_command: /sbin/init
provision_command:
- yum install -y upstart
- name: ubuntu-18.04
driver_config:
run_command: /lib/systemd/systemd
- name: ubuntu-16.04
driver_config:
run_command: /lib/systemd/systemd
- name: ubuntu-14.04
driver_config:
run_command: /sbin/init
provision_command:
- rm -f /sbin/initctl
- dpkg-divert --local --rename --remove /sbin/initctl
- name: debian-8
driver_config:
run_command: /lib/systemd/systemd
provision_command:
- apt-get install -y dbus
- name: debian-9
driver_config:
run_command: /lib/systemd/systemd
- name: arch
driver_config:
image: base/archlinux
run_command: /usr/lib/systemd/systemd
provision_command:
- pacman -Syu --noconfirm systemd
- systemctl enable sshd
- name: opensuse
driver_config:
run_command: /usr/lib/systemd/systemd
provision_command:
- systemctl enable sshd.service

suites:
- name: py2-git-2017.7
provisioner:
salt_version: 2017.7
- name: py2-git-2018.3
provisioner:
salt_version: 2018.3
- name: py2-git-fluorine
provisioner:
salt_version: fluorine
- name: py2-git-develop
provisioner:
salt_version: develop
- name: py2-stable-2017.7
provisioner:
salt_version: 2017.7
salt_bootstrap_options: -MP stable %s
excludes:
- arch
- centos-6
- fedora
- opensuse
- name: py2-stable-2018.3
provisioner:
salt_version: 2018.3
salt_bootstrap_options: -MP stable
excludes:
- centos-6

verifier:
name: shell
remote_exec: false
command: pytest -v tests/integration/
63 changes: 50 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,54 @@
language: ruby

services:
- docker

addons:
apt:
packages:
- curl
- git
- shellcheck
- python-pip

rvm:
- ruby

env:
matrix:
- PLATFORM=fedora
- PLATFORM=centos-7
- PLATFORM=centos-6
- PLATFORM=amazon-1
- PLATFORM=ubuntu-1804
- PLATFORM=ubuntu-1604
- PLATFORM=ubuntu-1404
- PLATFORM=debian-8
- PLATFORM=debian-9
- PLATFORM=arch
- PLATFORM=opensuse

matrix:
allow_failures:
- env: PLATFORM=ubuntu-1804
- env: PLATFORM=ubuntu-1604
- env: PLATFORM=debian-8
- env: PLATFORM=debian-9
- env: PLATFORM=centos-6

sudo: true
dist: trusty

before_install:
- "if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then sudo pip install unittest2; fi"
- sudo pip install --use-mirrors --mirrors=http://g.pypi.python.org/ --mirrors=http://c.pypi.python.org/ --mirrors=http://pypi.crate.io/ unittest-xml-reporting
- sudo apt-get remove -y -o DPkg::Options::=--force-confold --purge libzmq3
- sudo apt-get autoremove -y -o DPkg::Options::=--force-confold --purge
- sudo ls -lah /etc/apt/sources.list.d/
- sudo rm -f /etc/apt/sources.list.d/travis_ci_zeromq3-source.list
- sudo pip install git+https://github.com/saltstack/salt-testing.git#egg=SaltTesting
- pip install --user -r tests/requirements.txt

script:
- BS_ECHO_DEBUG=1 sudo -E python tests/runtests.py -vv
# Check shell scripts
- shellcheck -s sh -f checkstyle bootstrap-salt.sh
# Run test-kitchen with docker driver:
- bundle exec kitchen create -l warn -c 6 "$PLATFORM"
- bundle exec kitchen verify "$PLATFORM"

notifications:
irc:
channels: "irc.freenode.org#salt-devel"
on_success: change
on_failure: change
after_script:
- bundle exec kitchen list $PLATFORM
- bundle exec kitchen destroy "$PLATFORM"
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Version TBD (In Progress on the Develop Branch):

Version 2018.08.15:
* Add tests using kitchen-salt #1279
* Add python-futures to Py2 installs #1279

Version 2018.08.13:
* Fedora Py3 fixes (The-Loeki) #1273
* Handle commented lines in the requirements files for pip pkgs (rallytime) #1271
Expand Down
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org"

gem 'kitchen-salt', '~>0.2'
gem 'kitchen-docker', :git => 'https://github.com/test-kitchen/kitchen-docker.git'
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ sum** of the downloaded ``bootstrap-salt.sh`` file.

The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is:

- 2018.08.13: ``98284bdc2b5ebaeb619b22090374e42a68e8fdefe6bff1e73bd1760db4407ed0``
- 2018.04.25: ``e2e3397d6642ba6462174b4723f1b30d04229b75efc099a553e15ea727877dfb``
- 2017.12.13: ``c127b3aa4a8422f6b81f5b4a40d31d13cec97bf3a39bca9c11a28f24910a6895``
- 2017.08.17: ``909b4d35696b9867b34b22ef4b60edbc5a0e9f8d1ed8d05f922acb79a02e46e3``
Expand Down
22 changes: 13 additions & 9 deletions bootstrap-salt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#======================================================================================================================
set -o nounset # Treat unset variables as an error

__ScriptVersion="2018.08.13"
__ScriptVersion="2018.08.15"
__ScriptName="bootstrap-salt.sh"

__ScriptFullName="$0"
Expand Down Expand Up @@ -3140,7 +3140,7 @@ install_debian_8_git_deps() {

__PACKAGES="libzmq3 libzmq3-dev lsb-release python-apt python-crypto python-jinja2"
__PACKAGES="${__PACKAGES} python-m2crypto python-msgpack python-requests python-systemd"
__PACKAGES="${__PACKAGES} python-yaml python-zmq"
__PACKAGES="${__PACKAGES} python-yaml python-zmq python-concurrent.futures"

if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then
# Install python-libcloud if asked to
Expand Down Expand Up @@ -3211,7 +3211,7 @@ install_debian_9_git_deps() {
PY_PKG_VER=""

# These packages are PY2-ONLY
__PACKAGES="${__PACKAGES} python-backports-abc python-m2crypto"
__PACKAGES="${__PACKAGES} python-backports-abc python-m2crypto python-concurrent.futures"
fi

__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-apt python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2"
Expand Down Expand Up @@ -3429,7 +3429,7 @@ install_fedora_deps() {
fi
fi

__PACKAGES="${__PACKAGES} dnf-utils libyaml python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2"
__PACKAGES="${__PACKAGES} procps-ng dnf-utils libyaml python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2"
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests python${PY_PKG_VER}-zmq"

# shellcheck disable=SC2086
Expand Down Expand Up @@ -3800,7 +3800,7 @@ install_centos_git_deps() {
fi
fi

__PACKAGES="python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2"
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2"
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests"
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado python${PY_PKG_VER}-zmq"

Expand All @@ -3815,7 +3815,7 @@ install_centos_git_deps() {

if [ "${_PY_EXE}" != "" ] && [ "$_PIP_ALLOWED" -eq "$BS_TRUE" ]; then
# If "-x" is defined, install dependencies with pip based on the Python version given.
_PIP_PACKAGES="m2crypto jinja2 msgpack-python pycrypto PyYAML tornado<5.0 zmq"
_PIP_PACKAGES="m2crypto jinja2 msgpack-python pycrypto PyYAML tornado<5.0 zmq futures>=2.0"

# install swig and openssl on cent6
if [ "$DISTRO_MAJOR_VERSION" -eq 6 ]; then
Expand Down Expand Up @@ -4608,6 +4608,7 @@ _eof
# which is already installed
__PACKAGES="m2crypto ${pkg_append}-crypto ${pkg_append}-jinja2 ${pkg_append}-PyYAML"
__PACKAGES="${__PACKAGES} ${pkg_append}-msgpack ${pkg_append}-requests ${pkg_append}-zmq"
__PACKAGES="${__PACKAGES} ${pkg_append}-futures"

# shellcheck disable=SC2086
__yum_install_noinput ${__PACKAGES} || return 1
Expand All @@ -4627,6 +4628,9 @@ install_amazon_linux_ami_git_deps() {
PIP_EXE='pip'
if __check_command_exists python2.7; then
if ! __check_command_exists pip2.7; then
if ! __check_command_exists easy_install-2.7; then
__yum_install_noinput python27-setuptools
fi
/usr/bin/easy_install-2.7 pip || return 1
fi
PIP_EXE='/usr/local/bin/pip2.7'
Expand All @@ -4646,7 +4650,7 @@ install_amazon_linux_ami_git_deps() {

if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then
__check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud"
__PACKAGES="${__PACKAGES} python-pip"
__PACKAGES="${__PACKAGES} python27-pip"
__PIP_PACKAGES="${__PIP_PACKAGES} apache-libcloud>=$_LIBCLOUD_MIN_VERSION"
fi

Expand Down Expand Up @@ -4795,7 +4799,7 @@ install_arch_linux_stable() {
pacman -S --noconfirm --needed bash || return 1
pacman -Su --noconfirm || return 1
# We can now resume regular salt update
pacman -Syu --noconfirm salt || return 1
pacman -Syu --noconfirm salt python2-futures || return 1
return 0
}

Expand Down Expand Up @@ -5649,7 +5653,7 @@ install_opensuse_git_deps() {

__git_clone_and_checkout || return 1

__PACKAGES="libzmq5 python-Jinja2 python-m2crypto python-msgpack-python python-pycrypto python-pyzmq python-xml"
__PACKAGES="libzmq5 python-Jinja2 python-m2crypto python-msgpack-python python-pycrypto python-pyzmq python-xml python-futures"

if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then
# We're on the develop branch, install whichever tornado is on the requirements file
Expand Down
38 changes: 0 additions & 38 deletions tests/README.rst

This file was deleted.

4 changes: 4 additions & 0 deletions tests/accept_key.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accept_minion_key:
salt.wheel:
- name: key.accept
- match: salt
11 changes: 0 additions & 11 deletions tests/bootstrap/__init__.py

This file was deleted.

Loading

0 comments on commit 096f111

Please sign in to comment.