summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-04-15 12:00:24 -0700
committerGitHub <noreply@github.com>2019-04-15 12:00:24 -0700
commit5205661286a29a13a520f2bde49e82a864ccf603 (patch)
tree95080331bb3e225a44dbb64634f41f2bad898067
parentce11470525cf03df6b464112db9501d7c49fd29b (diff)
parenta42e6c3d80821dc4fc066393e76bbb39e49456fe (diff)
downloadchef-5205661286a29a13a520f2bde49e82a864ccf603.tar.gz
Merge pull request #8367 from chef/jsinha/add_all_verify
Add more verification tests
-rw-r--r--.expeditor/verify.pipeline.yml181
-rw-r--r--kitchen-tests/Gemfile1
-rw-r--r--kitchen-tests/kitchen.bk.yml38
-rwxr-xr-x[-rw-r--r--]scripts/bk_tests/bk_install.sh1
4 files changed, 209 insertions, 12 deletions
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml
index 2987928f01..437e10f937 100644
--- a/.expeditor/verify.pipeline.yml
+++ b/.expeditor/verify.pipeline.yml
@@ -4,34 +4,172 @@ steps:
# Tests Ruby 2.6
#########################################################################
-- label: "Integration Specs :ruby: 2.6"
+# - label: "Integration Specs :ruby: 2.6"
+# commands:
+# - /workdir/scripts/bk_tests/bk_install.sh
+# - sed '/ip6/d' /etc/hosts > /etc/hosts.noip6
+# - cp /etc/hosts.noip6 /etc/hosts
+# - cd /workdir; bundle install --without ci docgen guard integration maintenance omnibus_package --frozen
+# - bundle exec rake spec:integration
+# expeditor:
+# executor:
+# docker:
+# environment:
+# - FORCE_FFI_YAJL=ext
+# - CHEF_LICENSE=accept-no-persist
+# - INTEGRATION_SPECS_26=1
+# - BUNDLE_GEMFILE=/workdir/Gemfile
+#
+# - label: "Functional Specs :ruby: 2.6"
+# commands:
+# - /workdir/scripts/bk_tests/bk_install.sh
+# - sed '/ip6/d' /etc/hosts > /etc/hosts.noip6
+# - cp /etc/hosts.noip6 /etc/hosts
+# - cd /workdir; bundle install --without ci docgen guard integration maintenance omnibus_package --frozen
+# - bundle exec rake spec:functional
+# expeditor:
+# executor:
+# docker:
+# environment:
+# - FORCE_FFI_YAJL=ext
+# - CHEF_LICENSE=accept-no-persist
+# - FUNCTIONAL_SPECS_26=1
+
+- label: "Unit Specs :ruby: 2.6"
commands:
- /workdir/scripts/bk_tests/bk_install.sh
- - bundle exec rake spec:integration
+ - bundle install --without ci docgen guard integration maintenance omnibus_package --frozen
+ - bundle exec rake spec:unit
+ - bundle exec rake component_specs
expeditor:
executor:
docker:
environment:
- FORCE_FFI_YAJL=ext
- CHEF_LICENSE=accept-no-persist
- - INTEGRATION_SPECS_26=1
+ - UNIT_SPECS_26=1
-- label: "Functional Specs :ruby: 2.6"
+- label: "Chefstyle :ruby: 2.6"
commands:
- /workdir/scripts/bk_tests/bk_install.sh
- - bundle exec rake spec:functional
+ - bundle install --jobs=3 --retry=3 --deployment --path=vendor/bundle
+ - bundle exec rake style
expeditor:
executor:
docker:
environment:
- - FORCE_FFI_YAJL=ext
- - CHEF_LICENSE=accept-no-persist
- - FUNCTIONAL_SPECS_26=1
+ - CHEFSTYLE=1
-- label: "Unit Specs :ruby: 2.6"
+- label: "Test chef-sugar gem :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_install.sh
+ - bundle install --jobs=3 --retry=3 --deployment --path=vendor/bundle
+ - bundle exec tasks/bin/run_external_test sethvargo/chef-sugar master rake
+ expeditor:
+ executor:
+ docker:
+ environment:
+ - TEST_GEM=sethvargo/chef-sugar
+
+- label: "Test chef-zero gem :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_install.sh
+ - bundle install --jobs=3 --retry=3 --deployment --path=vendor/bundle
+ - bundle exec tasks/bin/run_external_test chef/chef-zero master rake pedant
+ expeditor:
+ executor:
+ docker:
+ environment:
+ - TEST_GEM=chef/chef-zero
+ - PEDANT_OPTS=--skip-oc_id
+ - CHEF_FS=true
+
+- label: "Test cheffish gem :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_install.sh
+ - bundle install --jobs=3 --retry=3 --deployment --path=vendor/bundle
+ - bundle exec tasks/bin/run_external_test chef/cheffish master rake spec
+ expeditor:
+ executor:
+ docker:
+ environment:
+ - TEST_GEM=chef/cheffish
+
+- label: "Test chefspec gem :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_install.sh
+ - bundle install --jobs=3 --retry=3 --deployment --path=vendor/bundle
+ - bundle exec tasks/bin/run_external_test chefspec/chefspec master rake
+ expeditor:
+ executor:
+ docker:
+ environment:
+ - TEST_GEM=chefspec/chefspec
+
+# - label: "Test poise/halite gem :ruby: 2.6"
+# commands:
+# - /workdir/scripts/bk_tests/bk_install.sh
+# - bundle install --jobs=3 --retry=3 --deployment --path=vendor/bundle
+# - bundle exec tasks/bin/run_external_test poise/halite master rake spec
+# expeditor:
+# executor:
+# docker:
+# environment:
+# - TEST_GEM=poise/halite
+
+- label: "Test knife-windows gem :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_install.sh
+ - bundle install --jobs=3 --retry=3 --deployment --path=vendor/bundle
+ - bundle exec tasks/bin/run_external_test chef/knife-windows master rake unit_spec
+ expeditor:
+ executor:
+ docker:
+ environment:
+ - TEST_GEM=chef/knife-windows
+
+#########################################################################
+ # Tests Ruby 2.5
+#########################################################################
+
+# - label: "Integration Specs :ruby: 2.5"
+# commands:
+# - /workdir/scripts/bk_tests/bk_install.sh
+# - asdf local ruby 2.5.5
+# - sed '/ip6/d' /etc/hosts > /etc/hosts.noip6
+# - cp /etc/hosts.noip6 /etc/hosts
+# - bundle install --without ci docgen guard integration maintenance omnibus_package --frozen
+# - bundle exec rake spec:integration
+# expeditor:
+# executor:
+# docker:
+# environment:
+# - FORCE_FFI_YAJL=ext
+# - CHEF_LICENSE=accept-no-persist
+# - INTEGRATION_SPECS_25=1
+#
+# - label: "Functional Specs :ruby: 2.5"
+# commands:
+# - asdf local ruby 2.5.5
+# - /workdir/scripts/bk_tests/bk_install.sh
+# - sed '/ip6/d' /etc/hosts > /etc/hosts.noip6
+# - cp /etc/hosts.noip6 /etc/hosts
+# - bundle install --without ci docgen guard integration maintenance omnibus_package --frozen
+# - bundle exec rake spec:functional
+# expeditor:
+# executor:
+# docker:
+# environment:
+# - FORCE_FFI_YAJL=ext
+# - CHEF_LICENSE=accept-no-persist
+# - FUNCTIONAL_SPECS_25=1
+
+- label: "Unit Specs :ruby: 2.5"
commands:
+ - asdf local ruby 2.5.5
- /workdir/scripts/bk_tests/bk_install.sh
- - bundle exec rake spec:unit;
+ - bundle install --without ci docgen guard integration maintenance omnibus_package --frozen
+ - bundle exec rake spec:unit
- bundle exec rake component_specs
expeditor:
executor:
@@ -39,4 +177,25 @@ steps:
environment:
- FORCE_FFI_YAJL=ext
- CHEF_LICENSE=accept-no-persist
- - UNIT_SPECS_26=1
+ - UNIT_SPECS_25=1
+
+#########################################################################
+ # START TEST KITCHEN ONLY
+#########################################################################
+
+# - label: "Kitchen Tests :ruby: 2.5"
+# commands:
+# - /workdir/scripts/bk_tests/bk_install.sh
+# - asdf local ruby 2.5.5
+# - sed '/ip6/d' /etc/hosts > /etc/hosts.noip6
+# - cp /etc/hosts.noip6 /etc/hosts
+# - cd /workdir/kitchen-tests
+# - bundle install --jobs=3 --retry=3 --path=vendor/bundle
+# - bundle exec kitchen test end-to-end-amazonlinux-2
+# expeditor:
+# executor:
+# docker:
+# environment:
+# - AMAZON=2
+# - KITCHEN_YAML=/workdir/kitchen-tests/kitchen.bk.yml
+# - BUNDLE_GEMFILE=/workdir/kitchen-tests/Gemfile
diff --git a/kitchen-tests/Gemfile b/kitchen-tests/Gemfile
index 6bd39ffe0e..da32a513ad 100644
--- a/kitchen-tests/Gemfile
+++ b/kitchen-tests/Gemfile
@@ -6,6 +6,7 @@ gem "ohai", git: "https://github.com/chef/ohai.git", branch: "master" # avoids f
gem "berkshelf", git: "https://github.com/berkshelf/berkshelf.git", branch: "master"
gem "kitchen-appbundle-updater"
gem "kitchen-dokken", "=1.1.1" # 2.x fails atm: https://travis-ci.org/chef/chef/jobs/199125787
+gem "kitchen-docker", git: "https://github.com/test-kitchen/kitchen-docker.git", branch: "master"
gem "kitchen-inspec", git: "https://github.com/chef/kitchen-inspec.git", branch: "master"
gem "kitchen-vagrant", git: "https://github.com/test-kitchen/kitchen-vagrant.git", branch: "master"
gem "test-kitchen", git: "https://github.com/test-kitchen/test-kitchen.git", branch: "master"
diff --git a/kitchen-tests/kitchen.bk.yml b/kitchen-tests/kitchen.bk.yml
new file mode 100644
index 0000000000..138b8aa0f9
--- /dev/null
+++ b/kitchen-tests/kitchen.bk.yml
@@ -0,0 +1,38 @@
+---
+driver:
+ name: docker
+ use_internal_docker_network: true
+ # socket: "tcp://127.0.0.1:2375"
+
+
+verifier:
+ name: inspec
+ format: progress
+
+provisioner:
+ name: chef_github
+ chef_omnibus_url: "https://omnitruck.chef.io/install.sh"
+ chef_omnibus_install_options: "-c current"
+ github_owner: "chef"
+ github_repo: "chef"
+ ohai_refname: "master"
+ refname: <%= %x(git rev-parse HEAD) %>
+ client_rb:
+ diff_disabled: true
+
+platforms:
+ - name: amazonlinux
+ # - name: amazonlinux-2
+ - name: centos-6
+ - name: centos-7
+ - name: debian-8
+ - name: debian-9
+ - name: opensuse-leap-42
+ - name: ubuntu-16.04
+ - name: ubuntu-18.04
+
+suites:
+ - name: end-to-end
+ run_list:
+ - recipe[end_to_end::default]
+ - recipe[end_to_end::tests]
diff --git a/scripts/bk_tests/bk_install.sh b/scripts/bk_tests/bk_install.sh
index 87b6f61ff3..de74af151c 100644..100755
--- a/scripts/bk_tests/bk_install.sh
+++ b/scripts/bk_tests/bk_install.sh
@@ -4,7 +4,6 @@ gem uninstall bundler -a -x || true
gem install bundler -v $(grep :bundler omnibus_overrides.rb | cut -d'"' -f2)
bundle --version
rm -f .bundle/config
-bundle install --without ci docgen guard integration maintenance omnibus_package --frozen
# force all .rspec tests into progress display to reduce line count
echo --color > .rspec
echo -fp >> .rspec