diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-11-22 09:49:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-22 09:49:47 -0800 |
commit | 28fc3b31fb787c4d1356a1ef71d014acdcec5aeb (patch) | |
tree | 079a87ad55f5c34b6ef1b00441cd7aeadf65ad86 | |
parent | b60307209ca0ec7f65baaa831df0fe746782336d (diff) | |
parent | ee7e537e4952151e19f4fbdd924a71eabc940647 (diff) | |
download | chef-28fc3b31fb787c4d1356a1ef71d014acdcec5aeb.tar.gz |
Merge pull request #5569 from chef/lcg/amazonlinux
add amazonlinux to travis matrix
-rw-r--r-- | .travis.yml | 18 | ||||
-rw-r--r-- | kitchen-tests/.kitchen.travis.yml | 9 | ||||
-rw-r--r-- | kitchen-tests/cookbooks/base/recipes/default.rb | 2 | ||||
-rw-r--r-- | kitchen-tests/cookbooks/base/recipes/packages.rb | 5 | ||||
-rw-r--r-- | kitchen-tests/test/integration/webapp/default_spec.rb | 4 |
5 files changed, 33 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index d0a89ede06..b08ec2d049 100644 --- a/.travis.yml +++ b/.travis.yml @@ -264,6 +264,24 @@ matrix: - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) - cd kitchen-tests script: + - bundle exec kitchen test webapp-amazonlinux + after_failure: + - cat .kitchen/logs/kitchen.log + env: + - AMAZONLINUX=LATEST + - KITCHEN_YAML=.kitchen.travis.yml + - rvm: 2.3.1 + services: docker + sudo: required + gemfile: kitchen-tests/Gemfile + before_install: + - gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2) + - gem install bundler -v $(grep bundler omnibus_overrides.rb | cut -d'"' -f2) + bundler_args: --without changelog development docgen guard integration maintenance omnibus_package tools aix bsd mac_os_x solaris windows --frozen + before_script: + - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) + - cd kitchen-tests + script: - bundle exec kitchen test awesome-customers-ubuntu-ubuntu-1404 after_failure: - cat .kitchen/logs/kitchen.log diff --git a/kitchen-tests/.kitchen.travis.yml b/kitchen-tests/.kitchen.travis.yml index 6dd43d0879..d0e17efa8c 100644 --- a/kitchen-tests/.kitchen.travis.yml +++ b/kitchen-tests/.kitchen.travis.yml @@ -115,6 +115,15 @@ platforms: intermediate_instructions: - RUN zypper refresh +- name: amazonlinux + driver: + image: amazonlinux:latest + pid_one_command: /sbin/init + intermediate_instructions: + - RUN yum clean all + - RUN yum -y install which initscripts net-tools sudo wget + - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers + suites: - name: webapp run_list: diff --git a/kitchen-tests/cookbooks/base/recipes/default.rb b/kitchen-tests/cookbooks/base/recipes/default.rb index 397d50c016..c25673bef5 100644 --- a/kitchen-tests/cookbooks/base/recipes/default.rb +++ b/kitchen-tests/cookbooks/base/recipes/default.rb @@ -23,7 +23,7 @@ yum_repository "epel" do gpgkey "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{node['platform_version'].to_i}" gpgcheck true mirrorlist "https://mirrors.fedoraproject.org/metalink?repo=epel-#{node['platform_version'].to_i}&arch=$basearch" - only_if { node["platform_family"] == "rhel" } + only_if { node["platform_family"] == "rhel" && node["platform"] != "amazon" } end include_recipe "build-essential" diff --git a/kitchen-tests/cookbooks/base/recipes/packages.rb b/kitchen-tests/cookbooks/base/recipes/packages.rb index 1ca8d81968..c4457e5945 100644 --- a/kitchen-tests/cookbooks/base/recipes/packages.rb +++ b/kitchen-tests/cookbooks/base/recipes/packages.rb @@ -1,6 +1,7 @@ - -pkgs = %w{lsof tcpdump strace zsh dmidecode ltrace bc curl wget telnet subversion git traceroute htop tmux s3cmd sysbench } +# this is just a list of package that exist on every O/S we test, and often aren't installed by default. you don't +# have to get too clever here, you can delete packages if they don't exist everywhere we test. +pkgs = %w{lsof tcpdump strace zsh dmidecode ltrace bc curl wget telnet subversion git traceroute htop tmux } # this deliberately calls the multipackage API N times in order to do one package installation in order to exercise the # multipackage cookbook. diff --git a/kitchen-tests/test/integration/webapp/default_spec.rb b/kitchen-tests/test/integration/webapp/default_spec.rb index ec23a57998..cf148218b7 100644 --- a/kitchen-tests/test/integration/webapp/default_spec.rb +++ b/kitchen-tests/test/integration/webapp/default_spec.rb @@ -12,7 +12,7 @@ when "debian", "ubuntu" ssh_package = "openssh-client" ssh_service = "ssh" ntp_service = "ntp" -when "centos", "redhat", "fedora" +when "centos", "redhat", "fedora", "amazon" ssh_package = "openssh-clients" ssh_service = "sshd" ntp_service = "ntpd" @@ -91,7 +91,7 @@ describe package("autoconf") do it { should be_installed } end -%w{lsof tcpdump strace zsh dmidecode ltrace bc curl wget telnet subversion git traceroute htop tmux s3cmd sysbench }.each do |pkg| +%w{lsof tcpdump strace zsh dmidecode ltrace bc curl wget telnet subversion git traceroute htop tmux }.each do |pkg| describe package pkg do it { should be_installed } end |