summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-06-07 18:28:27 -0700
committerTim Smith <tsmith@chef.io>2019-06-08 18:15:19 -0700
commitd31cc2216f7b70d2854a82dc4b0709d3190dd8e1 (patch)
treea5cefe1dfa87a799fec35a96772b9252fa152ea4
parent6112392929f237eeb1f2e9d826ae6fc69b7c67b5 (diff)
downloadchef-d31cc2216f7b70d2854a82dc4b0709d3190dd8e1.tar.gz
Add tests for CentOS & SUSE
Cross your fingers Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--.expeditor/verify.pipeline.yml167
-rwxr-xr-xscripts/bk_tests/bk_container_prep.sh26
-rwxr-xr-xscripts/bk_tests/bk_dokken_install.sh35
-rwxr-xr-xscripts/bk_tests/bk_install.sh11
4 files changed, 138 insertions, 101 deletions
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml
index a850643fb0..8c1201788b 100644
--- a/.expeditor/verify.pipeline.yml
+++ b/.expeditor/verify.pipeline.yml
@@ -10,59 +10,147 @@ steps:
# Tests Ruby 2.6
#########################################################################
-- label: "Integration Specs :ruby: 2.6"
+- label: "Integration Specs Ubuntu :ruby: 2.6"
commands:
- - /workdir/scripts/bk_tests/bk_install.sh
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
- cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen
- bundle exec rake spec:integration
expeditor:
executor:
docker:
- image: ruby:2.6-stretch
+ image: rubydistros/ubuntu-18.04
privileged: true
environment:
- FORCE_FFI_YAJL=ext
- CHEF_LICENSE=accept-no-persist
- BUNDLE_GEMFILE=/workdir/Gemfile
-- label: "Functional Specs :ruby: 2.6"
+- label: "Functional Specs Ubuntu :ruby: 2.6"
commands:
- - /workdir/scripts/bk_tests/bk_install.sh
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
- apt-get install -y cron locales # needed for functional tests to pass
- cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen ruby_prof
- bundle exec rake spec:functional
expeditor:
executor:
docker:
- image: ruby:2.6-stretch
+ image: rubydistros/ubuntu-18.04
privileged: true
environment:
- FORCE_FFI_YAJL=ext
- CHEF_LICENSE=accept-no-persist
-- label: "Unit Specs :ruby: 2.6"
+- label: "Unit Specs Ubuntu :ruby: 2.6"
commands:
- - /workdir/scripts/bk_tests/bk_install.sh
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
- bundle install --jobs=3 --retry=3 --without omnibus_package docgen ruby_prof
- bundle exec rake spec:unit
- bundle exec rake component_specs
expeditor:
executor:
docker:
- image: ruby:2.6-stretch
+ image: rubydistros/ubuntu-18.04
+ environment:
+ - FORCE_FFI_YAJL=ext
+ - CHEF_LICENSE=accept-no-persist
+
+- label: "Integration Specs CentOS :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
+ - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen
+ - bundle exec rake spec:integration
+ expeditor:
+ executor:
+ docker:
+ image: rubydistros/centos-7
+ privileged: true
+ environment:
+ - FORCE_FFI_YAJL=ext
+ - CHEF_LICENSE=accept-no-persist
+ - BUNDLE_GEMFILE=/workdir/Gemfile
+
+- label: "Functional Specs CentOS :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
+ - yum install -y cron mk2fs util-linux
+ - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen ruby_prof
+ - bundle exec rake spec:functional
+ expeditor:
+ executor:
+ docker:
+ image: rubydistros/centos-7
+ privileged: true
+ environment:
+ - FORCE_FFI_YAJL=ext
+ - CHEF_LICENSE=accept-no-persist
+
+- label: "Unit Specs CentOS :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
+ - bundle install --jobs=3 --retry=3 --without omnibus_package docgen ruby_prof
+ - bundle exec rake spec:unit
+ - bundle exec rake component_specs
+ expeditor:
+ executor:
+ docker:
+ image: rubydistros/centos-7
+ environment:
+ - FORCE_FFI_YAJL=ext
+ - CHEF_LICENSE=accept-no-persist
+
+- label: "Integration Specs openSUSE :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
+ - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen
+ - bundle exec rake spec:integration
+ expeditor:
+ executor:
+ docker:
+ image: rubydistros/opensuse-15
+ privileged: true
+ environment:
+ - FORCE_FFI_YAJL=ext
+ - CHEF_LICENSE=accept-no-persist
+ - BUNDLE_GEMFILE=/workdir/Gemfile
+
+- label: "Functional Specs openSUSE :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
+ - yum install -y cron mk2fs util-linux
+ - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen ruby_prof
+ - bundle exec rake spec:functional
+ expeditor:
+ executor:
+ docker:
+ image: rubydistros/opensuse-15
+ privileged: true
+ environment:
+ - FORCE_FFI_YAJL=ext
+ - CHEF_LICENSE=accept-no-persist
+
+- label: "Unit Specs openSUSE :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
+ - bundle install --jobs=3 --retry=3 --without omnibus_package docgen ruby_prof
+ - bundle exec rake spec:unit
+ - bundle exec rake component_specs
+ expeditor:
+ executor:
+ docker:
+ image: rubydistros/opensuse-15
environment:
- FORCE_FFI_YAJL=ext
- CHEF_LICENSE=accept-no-persist
- label: "Chefstyle :ruby: 2.6"
commands:
- - /workdir/scripts/bk_tests/bk_install.sh
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
- bundle install --jobs=3 --retry=3 --without omnibus_package docgen ruby_prof
- bundle exec rake style
expeditor:
executor:
docker:
- image: ruby:2.6-stretch
+ image: rubydistros/ubuntu-18.04
#########################################################################
# Tests Ruby 2.5
@@ -70,7 +158,7 @@ steps:
- label: "Integration Specs :ruby: 2.5"
commands:
- - /workdir/scripts/bk_tests/bk_install.sh
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
- bundle install --jobs=3 --retry=3 --without omnibus_package docgen
- bundle exec rake spec:integration
expeditor:
@@ -85,7 +173,7 @@ steps:
#
- label: "Functional Specs :ruby: 2.5"
commands:
- - /workdir/scripts/bk_tests/bk_install.sh
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
- apt-get install -y cron locales # needed for functional tests to pass
- bundle install --jobs=3 --retry=3 --without omnibus_package docgen
- bundle exec rake spec:functional
@@ -101,7 +189,7 @@ steps:
- label: "Unit Specs :ruby: 2.5"
commands:
- - /workdir/scripts/bk_tests/bk_install.sh
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
- bundle install --jobs=3 --retry=3 --without omnibus_package docgen
- bundle exec rake spec:unit
- bundle exec rake component_specs
@@ -120,56 +208,56 @@ steps:
- label: "Test chef-sugar gem :ruby: 2.6"
commands:
- - /workdir/scripts/bk_tests/bk_install.sh
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
- bundle install --jobs=3 --retry=3 --without omnibus_package docgen
- bundle exec tasks/bin/run_external_test sethvargo/chef-sugar master rake
expeditor:
executor:
docker:
- image: ruby:2.6-stretch
+ image: rubydistros/ubuntu-18.04
- label: "Test chef-zero gem :ruby: 2.6"
commands:
- - /workdir/scripts/bk_tests/bk_install.sh
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
- bundle install --jobs=3 --retry=3 --without omnibus_package docgen
- bundle exec tasks/bin/run_external_test chef/chef-zero master rake pedant
expeditor:
executor:
docker:
- image: ruby:2.6-stretch
+ image: rubydistros/ubuntu-18.04
environment:
- PEDANT_OPTS=--skip-oc_id
- CHEF_FS=true
- label: "Test cheffish gem :ruby: 2.6"
commands:
- - /workdir/scripts/bk_tests/bk_install.sh
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
- bundle install --jobs=3 --retry=3 --without omnibus_package docgen
- bundle exec tasks/bin/run_external_test chef/cheffish master rake spec
expeditor:
executor:
docker:
- image: ruby:2.6-stretch
+ image: rubydistros/ubuntu-18.04
- label: "Test chefspec gem :ruby: 2.6"
commands:
- - /workdir/scripts/bk_tests/bk_install.sh
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
- bundle install --jobs=3 --retry=3 --without omnibus_package docgen
- bundle exec tasks/bin/run_external_test chefspec/chefspec master rake
expeditor:
executor:
docker:
- image: ruby:2.6-stretch
+ image: rubydistros/ubuntu-18.04
- label: "Test knife-windows gem :ruby: 2.6"
commands:
- - /workdir/scripts/bk_tests/bk_install.sh
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
- bundle install --jobs=3 --retry=3 --without omnibus_package docgen
- bundle exec tasks/bin/run_external_test chef/knife-windows master rake unit_spec
expeditor:
executor:
docker:
- image: ruby:2.6-stretch
+ image: rubydistros/ubuntu-18.04
#########################################################################
# START TEST KITCHEN ONLY
@@ -340,34 +428,3 @@ steps:
linux:
privileged: true
single-use: true
-
-- label: "rspec on CentOS 7 :ruby: 2.5"
- commands:
- - scripts/bk_tests/bk_linux_exec.sh
- - cd kitchen-tests
- - ~/.asdf/shims/bundle exec kitchen test rspec-centos-7
- artifact_paths:
- - $PWD/.kitchen/logs/kitchen.log
- env:
- KITCHEN_YAML: kitchen.yml
- expeditor:
- executor:
- linux:
- image: centos/ruby-25-centos7
- privileged: true
- single-use: true
-
-- label: "rspec on openSUSE Leap 42 :ruby: 2.5"
- commands:
- - scripts/bk_tests/bk_linux_exec.sh
- - cd kitchen-tests
- - ~/.asdf/shims/bundle exec kitchen test rspec-opensuse-leap\
- artifact_paths:
- - $PWD/.kitchen/logs/kitchen.log
- env:
- KITCHEN_YAML: kitchen.yml
- expeditor:
- executor:
- linux:
- privileged: true
- single-use: true
diff --git a/scripts/bk_tests/bk_container_prep.sh b/scripts/bk_tests/bk_container_prep.sh
new file mode 100755
index 0000000000..f5d9621599
--- /dev/null
+++ b/scripts/bk_tests/bk_container_prep.sh
@@ -0,0 +1,26 @@
+# This script gets a container ready to run our various tests in BuildKite
+
+# make sure we have the network tools in place for various network specs
+if [ -f /etc/debian_version ]; then
+ apt-get update -y && apt-get install -y net-tools iproute2
+ touch /etc/network/interfaces
+else
+ yum install -y net-tools
+fi
+
+# git and build tools
+if [ -f /etc/redhat-release ]; then
+ yum install -y git make gcc gcc-c++ openssl-devel readline-devel zlib-devel which
+fi
+
+# make sure we have the omnibus_overrides specified version of rubygems / bundler
+gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2)
+gem --version
+gem uninstall bundler -a -x || true
+gem install bundler -v $(grep :bundler omnibus_overrides.rb | cut -d'"' -f2)
+bundle --version
+rm -f .bundle/config
+
+# force all .rspec tests into progress display to reduce line count
+echo --color > .rspec
+echo -fp >> .rspec
diff --git a/scripts/bk_tests/bk_dokken_install.sh b/scripts/bk_tests/bk_dokken_install.sh
deleted file mode 100755
index 3dd03deecf..0000000000
--- a/scripts/bk_tests/bk_dokken_install.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-# Install omnibus-toolchain for git bundler and gem
-curl -fsSL https://chef.io/chef/install.sh | sudo bash -s -- -P omnibus-toolchain
-
-# Set Environment Variables
-export BUNDLE_GEMFILE=$PWD/kitchen-tests/Gemfile
-export FORCE_FFI_YAJL=ext
-export CHEF_LICENSE="accept-silent"
-export PATH=/opt/asdf/bin:/opt/asdf/shims:/opt/omnibus-toolchain/embedded/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
-
-# Install Dev tools
-sudo yum install -y gcc gcc-c++ openssl-devel readline-devel zlib-devel iptables
-sudo zypper install -y gcc gcc-c++ openssl-devel readline-devel zlib-devel iptables
-
-# Install ASDF software manager
-echo "--- Installing ASDF software version manager from master"
-sudo /opt/omnibus-toolchain/embedded/bin/git clone https://github.com/asdf-vm/asdf.git /opt/asdf
-. /opt/asdf/asdf.sh
-. /opt/asdf/completions/asdf.bash
-
-echo "--- Installing Ruby ASDF plugin"
-/opt/asdf/bin/asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby.git
-
-echo "--- Installing Ruby 2.5.5"
-/opt/asdf/bin/asdf install ruby 2.5.5
-/opt/asdf/bin/asdf global ruby 2.5.5
-
-# Update Gems
-gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2)
-gem install bundler -v $(grep :bundler omnibus_overrides.rb | cut -d'"' -f2) --force --no-document
-sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
-ruby --version
-which bundle
-bundle install --jobs=3 --retry=3 --path=vendor/bundle \ No newline at end of file
diff --git a/scripts/bk_tests/bk_install.sh b/scripts/bk_tests/bk_install.sh
deleted file mode 100755
index e8fefc2d02..0000000000
--- a/scripts/bk_tests/bk_install.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-apt-get update -y && apt-get install -y net-tools iproute2
-touch /etc/network/interfaces
-gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2)
-gem --version
-gem uninstall bundler -a -x || true
-gem install bundler -v $(grep :bundler omnibus_overrides.rb | cut -d'"' -f2)
-bundle --version
-rm -f .bundle/config
-# force all .rspec tests into progress display to reduce line count
-echo --color > .rspec
-echo -fp >> .rspec