This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Run test-kitchen suites in cloud hosting via Travis #108
Open
patcon
wants to merge
26
commits into
bflad:master
Choose a base branch
from
patcon:feature/108-test-kitchen-cloud
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
481bb00
Added DigitalOcean testing for patcon/chef-stash repo.
patcon 2171162
Added inline hint for DigitalOcean SSH key IDs.
patcon e922cd0
Converted 'empty?' methods in template into booleans.
patcon 67ac33a
Added chef-sugar cookbook for access to #blank? helper.
patcon fa7125e
Oops. Forgot to add travis kitchen.yml.
patcon dd38fbd
Installed chef-sugar properly.
patcon 279c221
Make sure java memory settings match digitalocean image's.
patcon 104548c
Build just feature branch for testing.
patcon 6161e7f
Bumped cloud test image size to 1024 mb.
patcon d054ca3
Fixed up cruft from old mysql cookbook attributes.
patcon e00fb56
Added more digitalocean memory for testing.
patcon bc6f3e2
Added paralellism and envvar check to cloud integration tests.
patcon 20d1ee0
Added package manager recipes to local override platforms.
patcon e298f33
Force apt update at compiletime
patcon 3de36f1
Start using chef_zero provisioner.
patcon 7cdec89
Test against Chef 12.4.1.
patcon d3c1034
Removed compiletime build-essential, as this is handled by postgresql…
patcon b010bea
Updated README badge for now.
patcon 984e27c
Output instance listing for failure clarity. [ci skip]
patcon 9ce5df7
Reverted back to using Chef 11 for less verbose logs.
patcon feff06a
Moved to using an omnibus version that is exists.
patcon c5041bc
Use minimal formatter on travis cloud tests.
patcon 355f96d
Cleaned up kitchen.yml merging.
patcon 5605969
Simplified kitchen.yml setup.
patcon 3f08d7f
Clean up travis.yml. [ci skip]
patcon 0674296
Added note about node.apt.compile_time_update [ci skip]
patcon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
driver: | ||
name: digitalocean | ||
private_networking: false | ||
size: 1gb | ||
|
||
provisioner: | ||
client_rb: | ||
formatters: | ||
# Travis CI will cancel job if logs get over 4MB. | ||
- :minimal | ||
attributes: | ||
stash: | ||
jvm: | ||
maximum_memory: 1024m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,41 @@ | ||
language: ruby | ||
bundler_args: --without integration | ||
|
||
cache: bundler | ||
sudo: false | ||
|
||
rvm: | ||
- 2.0.0 | ||
- 2.0.0 | ||
|
||
env: | ||
global: | ||
# Uses public key of private keypair set up in `before_install` task. | ||
# Hint: Inspect SSH key edit buttons in DigitalOcean web interface for IDs. | ||
- DIGITALOCEAN_SSH_KEY_IDS="970381" | ||
# DIGITALOCEAN_ACCESS_TOKEN | ||
- secure: "LYbpXAi9+TuzF4kuMiJTXKbgqnPGkokdX0dm+REduODCzORbPlmcfhdJNSpbYOE+PAM9uqjtAlHiuZQ5dvHdP7HgELcFFOhFEvjCWGypxBBMCNbBp6BCMX2wkUPgATqdkyEMsznCQEDbtK61OuJAMT082X7DQVo1qwWnsEmx8cAsIy9hw1c6yXGMDM8nv3ymSwu9FyQ6Vje8d0ZzLy06OkRs8T60LekzZBBus5wESRf0E8wy4I51qLZbndkCgLA/WyAKpK5rczJP3Ve5DNbMBJHyyYILYN7vKyb0JlOdI97juqa6bJYcsBA2EmpYISfWEzTW4hd5hPModqzjHxHPGada4y7rE7w6FEAXO4N/flxJe/tFe2/fHs8sLO3b8awh3YWVJ0FMP/gl8biXAc42DSiF9flMRc9eM0bqDqijOmK+LLL3FoIP7nRnvF2evcZ6bdLkNH9MnkomCliAovPfaDfD4UQXkRN5Nl5HwcIhCvve3j6Uq7o633r409R6Qc5k1ri63FIya/Iyddo4jHYperSv6/ISgwdfGGeRBpP7cZJ/ZA+tCRdQFjELwjG91Pen4im59qjc2IkVV+XrKhde7Hpl4PgiRDeWW230v8obS4Y31iL/usMm1c1UIgW2azrS7TaFdMJBmLOaO68eRJpyyqz5pGZ5tSgWMNaogD/Am5M=" | ||
|
||
before_install: | ||
# Decrypt pre-generated private key | ||
# See: http://docs.travis-ci.com/user/encrypting-files/ | ||
- openssl aes-256-cbc -K $encrypted_370ffe2e34a2_key -iv $encrypted_370ffe2e34a2_iv -in test/support/travis_id_rsa.key.enc -out ~/.ssh/id_rsa -d | ||
- chmod 600 ~/.ssh/id_rsa | ||
# Re-generate public key from private | ||
- ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub | ||
|
||
before_script: | ||
- bundle exec berks install | ||
- cp .kitchen.travis.yml .kitchen.local.yml | ||
|
||
script: | ||
- bundle exec rake travis | ||
- bundle exec rake style:ruby | ||
- bundle exec rake style:chef | ||
- '[ "${TRAVIS_SECURE_ENV_VARS}" = "true" ] && bundle exec kitchen test --parallel' | ||
|
||
after_script: | ||
- bundle exec kitchen list | ||
- bundle exec kitchen destroy | ||
|
||
branches: | ||
only: | ||
- feature/108-test-kitchen-cloud | ||
|
||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, DigitalOcean images don't have an FQDN (from which this is set in attributes), so it's nil and there's not
#empty?
. Realized we probably shouldn't be using this method anyhow, so swapped it out.If we really want something robust (I'm not sure it's an edgecase worth pandering to) then we could perhaps use
#blank?
from chef-sugar cookbook:https://github.com/sethvargo/chef-sugar#core-extensions
I don't think that's worth it though -- a blank string shouldn't be set for any of these anyhow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. Seems we are using blank strings for some of this stuff in
attributes/default.rb
... what are your thoughts here @linc01n? Usingnil
for unset things seems more sensible to me. Or we could mix-and-match approaches in this template, and just assume nil is the blank value for thevirtual_host_*
attrs.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And just confirmed that chef-sugar would resolve this. That cookbook is pretty established and has lots of other things that wemight benefit from using, so perhaps we could add it?
https://github.com/sethvargo/chef-sugar/blob/bd65556f7c101d9fa8cd68d6a7ded2a1daf6525b/lib/chef/sugar/core_extensions/object.rb#L21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding chef-sugar is ok i think.