diff options
author | Jaymala Sinha <jsinha@chef.io> | 2019-09-10 10:32:27 -0400 |
---|---|---|
committer | Jaymala Sinha <jsinha@chef.io> | 2019-09-10 10:58:08 -0400 |
commit | 154df6d97e586b3b308a904217855002d54f64fd (patch) | |
tree | dbbf8315d837be6839947a9f274cb0dbcac91f86 | |
parent | 8c33931e5df22152326611b345e3f04c794f3063 (diff) | |
download | chef-154df6d97e586b3b308a904217855002d54f64fd.tar.gz |
Migrate all verification to Buildkite
Signed-off-by: Jaymala Sinha <jsinha@chef.io>
-rw-r--r-- | .expeditor/verify.pipeline.yml | 562 | ||||
-rwxr-xr-x | scripts/bk_tests/bk_container_prep.sh | 21 | ||||
-rwxr-xr-x | scripts/bk_tests/bk_linux_exec.sh | 45 | ||||
-rwxr-xr-x | scripts/bk_tests/bk_win_functional.ps1 | 13 | ||||
-rwxr-xr-x | scripts/bk_tests/bk_win_integration.ps1 | 13 | ||||
-rwxr-xr-x | scripts/bk_tests/bk_win_unit.ps1 | 14 |
6 files changed, 551 insertions, 117 deletions
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 5aaa0aefda..b5587c0701 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -1,190 +1,518 @@ +--- +expeditor: + defaults: + buildkite: + retry: + automatic: + limit: 1 + timeout_in_minutes: 30 + retry: + automatic: + limit: 1 + steps: ######################################################################### # Tests 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 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 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 install --without ci docgen guard integration omnibus_package --frozen +- label: "Integration Specs Ubuntu :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/ubuntu-18.04 + privileged: true + environment: + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist + - BUNDLE_GEMFILE=/workdir/Gemfile + +- label: "Functional Specs Ubuntu :ruby: 2.6" + commands: + - /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: rubydistros/ubuntu-18.04 + privileged: true + environment: + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist + +- label: "Unit Specs Ubuntu :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/ubuntu-18.04 environment: - FORCE_FFI_YAJL=ext - CHEF_LICENSE=accept-no-persist - - UNIT_SPECS_26=1 -- label: "Chefstyle :ruby: 2.6" +- label: "Integration Specs CentOS :ruby: 2.6" commands: - - /workdir/scripts/bk_tests/bk_install.sh - - bundle install --jobs=3 --retry=3 --deployment --path=vendor/bundle - - bundle exec rake style + - /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: - - CHEFSTYLE=1 + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist + - BUNDLE_GEMFILE=/workdir/Gemfile -- label: "Test chef-sugar gem :ruby: 2.6" +- label: "Functional Specs CentOS :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 + - /workdir/scripts/bk_tests/bk_container_prep.sh + - yum install -y crontabs e2fsprogs 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: - - TEST_GEM=sethvargo/chef-sugar + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist -- label: "Test chef-zero gem :ruby: 2.6" +- label: "Unit Specs CentOS :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 + - /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: - - TEST_GEM=chef/chef-zero - - PEDANT_OPTS=--skip-oc_id - - CHEF_FS=true + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist -- label: "Test cheffish gem :ruby: 2.6" +- label: "Integration Specs openSUSE :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 + - /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: - - TEST_GEM=chef/cheffish + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist + - BUNDLE_GEMFILE=/workdir/Gemfile -- label: "Test chefspec gem :ruby: 2.6" +- label: "Functional Specs openSUSE :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 + - /workdir/scripts/bk_tests/bk_container_prep.sh + - zypper install -y cronie + - 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: - - TEST_GEM=chefspec/chefspec + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist -- label: "Test knife-windows gem :ruby: 2.6" +- label: "Unit Specs openSUSE :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 + - /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: "Integration Specs Fedora :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/fedora-latest + privileged: true + environment: + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist + - BUNDLE_GEMFILE=/workdir/Gemfile + +- label: "Functional Specs Fedora :ruby: 2.6" + commands: + - /workdir/scripts/bk_tests/bk_container_prep.sh + - yum install -y crontabs e2fsprogs 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/fedora-latest + privileged: true + environment: + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist + +- label: "Unit Specs Fedora :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/fedora-latest environment: - - TEST_GEM=chef/knife-windows + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist + +- label: "Integration Specs Windows :ruby: 2.6" + commands: + - /workdir/scripts/bk_tests/bk_win_integration.ps1 + expeditor: + executor: + docker: + host_os: windows + os_version: 2016 + environment: + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist + shell: ["powershell", "-Command"] + +- label: "Functional Specs Windows :ruby: 2.6" + commands: + - /workdir/scripts/bk_tests/bk_win_functional.ps1 + expeditor: + executor: + docker: + host_os: windows + os_version: 2016 + environment: + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist + shell: ["powershell", "-Command"] + +- label: "Unit Specs Windows :ruby: 2.6" + commands: + - /workdir/scripts/bk_tests/bk_win_unit.ps1 + expeditor: + executor: + docker: + host_os: windows + environment: + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist + shell: ["powershell", "-Command"] + +- label: "Chefstyle :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 style + expeditor: + executor: + docker: + image: rubydistros/ubuntu-18.04 ######################################################################### # 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 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: "Integration Specs :ruby: 2.5" + commands: + - /workdir/scripts/bk_tests/bk_container_prep.sh + - bundle install --jobs=3 --retry=3 --without omnibus_package docgen + - bundle exec rake spec:integration + expeditor: + executor: + docker: + image: ruby:2.5-stretch + privileged: true + 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 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: "Functional Specs :ruby: 2.5" + commands: + - /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 + expeditor: + executor: + docker: + image: ruby:2.5-stretch + privileged: true + 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 install --without ci docgen guard integration omnibus_package --frozen + - /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 expeditor: executor: docker: + image: ruby:2.5-stretch environment: - FORCE_FFI_YAJL=ext - CHEF_LICENSE=accept-no-persist - UNIT_SPECS_25=1 ######################################################################### + # EXTERNAL GEM TESTING +######################################################################### + +- label: "Test chef-sugar gem :ruby: 2.6" + commands: + - /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: rubydistros/ubuntu-18.04 + +- label: "Test chef-zero gem :ruby: 2.6" + commands: + - /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: 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_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: rubydistros/ubuntu-18.04 + +- label: "Test chefspec gem :ruby: 2.6" + commands: + - /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: rubydistros/ubuntu-18.04 + +- label: "Test knife-windows gem :ruby: 2.6" + commands: + - /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: rubydistros/ubuntu-18.04 + +######################################################################### # 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 +- label: "Kitchen Tests :amazon: 2" + commands: + - scripts/bk_tests/bk_linux_exec.sh + - cd kitchen-tests + - ~/.asdf/shims/bundle exec kitchen test end-to-end-amazonlinux-2 + artifact_paths: + - $PWD/.kitchen/logs/kitchen.log + env: + KITCHEN_YAML: kitchen.yml + expeditor: + executor: + linux: + privileged: true + single-use: true + +- label: "Kitchen Tests :amazon: 201X" + commands: + - scripts/bk_tests/bk_linux_exec.sh + - cd kitchen-tests + - ~/.asdf/shims/bundle exec kitchen test end-to-end-amazonlinux-2 + artifact_paths: + - $PWD/.kitchen/logs/kitchen.log + env: + KITCHEN_YAML: kitchen.yml + expeditor: + executor: + linux: + privileged: true + single-use: true + +- label: "Kitchen Tests Ubuntu: 16.04" + commands: + - scripts/bk_tests/bk_linux_exec.sh + - cd kitchen-tests + - ~/.asdf/shims/bundle exec kitchen test end-to-end-ubuntu-1604 + artifact_paths: + - $PWD/.kitchen/logs/kitchen.log + env: + UBUNTU: "16.04" + KITCHEN_YAML: kitchen.yml + expeditor: + executor: + linux: + privileged: true + single-use: true + +- label: "Kitchen Tests Ubuntu: 18.04" + commands: + - scripts/bk_tests/bk_linux_exec.sh + - cd kitchen-tests + - ~/.asdf/shims/bundle exec kitchen test end-to-end-ubuntu-1804 + artifact_paths: + - $PWD/.kitchen/logs/kitchen.log + env: + KITCHEN_YAML: kitchen.yml + expeditor: + executor: + linux: + privileged: true + single-use: true + +- label: "Kitchen Tests Debian: 8" + commands: + - scripts/bk_tests/bk_linux_exec.sh + - cd kitchen-tests + - ~/.asdf/shims/bundle exec kitchen test end-to-end-debian-8 + artifact_paths: + - $PWD/.kitchen/logs/kitchen.log + env: + KITCHEN_YAML: kitchen.yml + expeditor: + executor: + linux: + privileged: true + single-use: true + +- label: "Kitchen Tests Debian: 9" + commands: + - scripts/bk_tests/bk_linux_exec.sh + - cd kitchen-tests + - ~/.asdf/shims/bundle exec kitchen test end-to-end-debian-9 + artifact_paths: + - $PWD/.kitchen/logs/kitchen.log + env: + KITCHEN_YAML: kitchen.yml + expeditor: + executor: + linux: + privileged: true + single-use: true + +- label: "Kitchen Tests Debian: 10" + commands: + - scripts/bk_tests/bk_linux_exec.sh + - cd kitchen-tests + - ~/.asdf/shims/bundle exec kitchen test end-to-end-debian-10 + artifact_paths: + - $PWD/.kitchen/logs/kitchen.log + env: + KITCHEN_YAML: kitchen.yml + expeditor: + executor: + linux: + privileged: true + single-use: true + +- label: "Kitchen Tests CentOS: 6" + commands: + - scripts/bk_tests/bk_linux_exec.sh + - cd kitchen-tests + - ~/.asdf/shims/bundle exec kitchen test end-to-end-centos-6 + artifact_paths: + - $PWD/.kitchen/logs/kitchen.log + env: + KITCHEN_YAML: kitchen.yml + expeditor: + executor: + linux: + privileged: true + single-use: true + +- label: "Kitchen Tests CentOS: 7" + commands: + - scripts/bk_tests/bk_linux_exec.sh + - cd kitchen-tests + - ~/.asdf/shims/bundle exec kitchen test end-to-end-centos-7 + artifact_paths: + - $PWD/.kitchen/logs/kitchen.log + env: + KITCHEN_YAML: kitchen.yml + expeditor: + executor: + linux: + privileged: true + single-use: true + +- label: "Kitchen Tests Fedora: latest" + commands: + - scripts/bk_tests/bk_linux_exec.sh + - cd kitchen-tests + - ~/.asdf/shims/bundle exec kitchen test end-to-end-fedora-latest + artifact_paths: + - $PWD/.kitchen/logs/kitchen.log + env: + KITCHEN_YAML: kitchen.yml + expeditor: + executor: + linux: + privileged: true + single-use: true + +- label: "Kitchen Tests openSUSE Leap: 42" + commands: + - scripts/bk_tests/bk_linux_exec.sh + - cd kitchen-tests + - ~/.asdf/shims/bundle exec kitchen test end-to-end-opensuse-leap + artifact_paths: + - $PWD/.kitchen/logs/kitchen.log + env: + KITCHEN_YAML: kitchen.yml + expeditor: + executor: + linux: + privileged: true + single-use: true
\ No newline at end of file diff --git a/scripts/bk_tests/bk_container_prep.sh b/scripts/bk_tests/bk_container_prep.sh new file mode 100755 index 0000000000..1718c45b72 --- /dev/null +++ b/scripts/bk_tests/bk_container_prep.sh @@ -0,0 +1,21 @@ +# 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 +elif [ -f /etc/redhat-release ]; then + yum install -y net-tools +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
\ No newline at end of file diff --git a/scripts/bk_tests/bk_linux_exec.sh b/scripts/bk_tests/bk_linux_exec.sh new file mode 100755 index 0000000000..fee73aa6bb --- /dev/null +++ b/scripts/bk_tests/bk_linux_exec.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +# Enable IPv6 in docker +sudo systemctl stop docker +echo "Enabling IPv6 in Docker config" +dockerd_config="/etc/docker/daemon.json" +sudo echo "$(jq '. + {"ipv6": true, "fixed-cidr-v6": "2001:2019:6002::/80", "ip-forward": false}' $dockerd_config)" > $dockerd_config +sudo systemctl start docker + +# Verify Docker Is Running +docker version +sudo service docker status + +# Install C and C++ +sudo yum install -y gcc gcc-c++ openssl-devel readline-devel zlib-devel + +# 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=$PATH:~/.asdf/shims:/opt/asdf/bin:/opt/asdf/shims:/opt/omnibus-toolchain/embedded/bin + +# Install ASDF software manager +echo "--- Installing ASDF software version manager from master" +sudo 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_win_functional.ps1 b/scripts/bk_tests/bk_win_functional.ps1 new file mode 100755 index 0000000000..06695ccd97 --- /dev/null +++ b/scripts/bk_tests/bk_win_functional.ps1 @@ -0,0 +1,13 @@ +echo "--- system details" +$Properties = 'Caption', 'CSName', 'Version', 'BuildType', 'OSArchitecture' +Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table -AutoSize +ruby -v +bundle --version + +echo "--- bundle install" +bundle install --jobs=3 --retry=3 --without omnibus_package docgen chefstyle + +echo "+++ bundle exec rake" +bundle exec rake spec:functional + +exit $LASTEXITCODE
\ No newline at end of file diff --git a/scripts/bk_tests/bk_win_integration.ps1 b/scripts/bk_tests/bk_win_integration.ps1 new file mode 100755 index 0000000000..c6cdd5e2b1 --- /dev/null +++ b/scripts/bk_tests/bk_win_integration.ps1 @@ -0,0 +1,13 @@ +echo "--- system details" +$Properties = 'Caption', 'CSName', 'Version', 'BuildType', 'OSArchitecture' +Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table -AutoSize +ruby -v +bundle --version + +echo "--- bundle install" +bundle install --jobs=3 --retry=3 --without omnibus_package docgen chefstyle + +echo "+++ bundle exec rake" +bundle exec rake spec:integration + +exit $LASTEXITCODE
\ No newline at end of file diff --git a/scripts/bk_tests/bk_win_unit.ps1 b/scripts/bk_tests/bk_win_unit.ps1 new file mode 100755 index 0000000000..48ad3fe283 --- /dev/null +++ b/scripts/bk_tests/bk_win_unit.ps1 @@ -0,0 +1,14 @@ +echo "--- system details" +$Properties = 'Caption', 'CSName', 'Version', 'BuildType', 'OSArchitecture' +Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table -AutoSize +ruby -v +bundle --version + +echo "--- bundle install" +bundle install --jobs=3 --retry=3 --without omnibus_package docgen chefstyle + +echo "+++ bundle exec rake" +bundle exec rake spec:unit +bundle exec rake component_specs + +exit $LASTEXITCODE
\ No newline at end of file |