Skip to content

Commit

Permalink
Merge pull request #3 from reallyenglish/remove_patches
Browse files Browse the repository at this point in the history
Remove patches
  • Loading branch information
Tomoyuki Sakurai committed May 23, 2016
2 parents 4df2f77 + d8744c0 commit da39f5e
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -1,3 +1,6 @@
/.kitchen/
.kitchen.local.yml
.swp
.bundle/
vendor/
Gemfile.lock
2 changes: 2 additions & 0 deletions .kitchen.yml
Expand Up @@ -25,6 +25,8 @@ platforms:
driver_config:
ssh:
shell: '/bin/sh'
transport:
name: sftp

suites:
- name: default
Expand Down
12 changes: 12 additions & 0 deletions Gemfile
@@ -0,0 +1,12 @@
source 'https://rubygems.org'

gem 'rspec', '~> 3.4.0'
gem "test-kitchen", '~> 1.6.0'
gem "kitchen-vagrant", '~> 0.19.0'
# use patched kitchen-ansible
gem "kitchen-ansible", '~> 0.40.1', :git => 'https://github.com/trombik/kitchen-ansible.git', :branch => 'freebsd_support'
gem 'kitchen-verifier-shell', '~> 0.2.0'
gem 'kitchen-verifier-serverspec', '~> 0.3.0'
gem 'infrataster', '~> 0.3.2'
gem 'serverspec', '~> 2.31.0'
gem 'kitchen-sync', '~> 2.1.1'
27 changes: 27 additions & 0 deletions Jenkinsfile
@@ -0,0 +1,27 @@
node ('virtualbox') {
stage 'Checkout'
sh 'if [ ! -d ansible-role-hadoop-namenode ]; then mkdir ansible-role-hadoop-namenode; fi'
dir('ansible-role-hadoop-namenode') {
checkout scm
}
dir('ansible-role-hadoop-namenode') {
stage 'bundle'
sh 'bundle install --path vendor/bundle'
sh 'if vagrant box list | grep trombik/ansible-freebsd-10.3-amd64 >/dev/null; then echo "installed"; else vagrant box add trombik/ansible-freebsd-10.3-amd64; fi'
sh 'id'

stage 'Syntax check'
try {
sh 'ansible-playbook --syntax-check -i localhost test/integration/default.yml'
currentBuild.result = 'SUCCESS'
} catch (err) {
currentBuild.result = 'FAILURE'
}

stage 'bundle exec kitchen test'
sh 'bundle exec kitchen test'

stage 'Notify'
step([$class: 'GitHubCommitNotifier', resultOnFailure: 'FAILURE'])
}
}
2 changes: 2 additions & 0 deletions ansible.cfg
@@ -0,0 +1,2 @@
[defaults]
roles_path = ../
2 changes: 2 additions & 0 deletions spec/serverspec/default_spec.rb
@@ -1,6 +1,8 @@
require 'spec_helper'
require 'serverspec'

sleep 30

package = 'hadoop'
service = 'namenode'
user = 'hdfs'
Expand Down

0 comments on commit da39f5e

Please sign in to comment.