Skip to content

Commit

Permalink
Merge pull request #183 from rtyler/issues/135-unzip-not-available
Browse files Browse the repository at this point in the history
Rely on the `jar` command instead of `unzip` to unpack the cli.jar
  • Loading branch information
R. Tyler Croy committed Sep 23, 2014
2 parents a00590b + 6ac48fd commit 161b82c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
language: ruby
bundler_args: --without development
before_install: gem install bundler -v '~> 1.6.0' --no-ri --no-rdoc
bundler_args: "--without development plugins"
script: "bundle exec rake spec SPEC_OPTS='--format documentation'"
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.1.0
script:
- "rake lint"
- "rake spec SPEC_OPTS='--format documentation'"
- "bundle exec rake lint"
- "bundle exec rake spec SPEC_OPTS='--format documentation'"
env:
- PUPPET_VERSION="~> 2.7.0"
- PUPPET_VERSION="~> 3.1.0"
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ source 'https://rubygems.org'

gem 'rake', '>= 10.1.1'
gem 'rspec', '~> 2.99.0'
gem 'rspec-its'
gem 'puppet-lint', '>= 0.3.2'
gem 'rspec-puppet', '>= 1.0.1'
gem 'puppetlabs_spec_helper', :github => 'jenkins-infra/puppetlabs_spec_helper'
Expand All @@ -18,7 +19,7 @@ group :development do

gem 'serverspec'
gem 'vagrant', :github => 'mitchellh/vagrant',
:ref => 'v1.5.3',
:ref => 'v1.6.5',
:platform => :mri
end

Expand Down
2 changes: 1 addition & 1 deletion manifests/cli.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
}

$extract_jar = "unzip ${war} WEB-INF/jenkins-cli.jar"
$extract_jar = "jar -xf ${war} WEB-INF/jenkins-cli.jar"
$move_jar = "mv WEB-INF/jenkins-cli.jar ${jar}"
$remove_dir = 'rm -rf WEB-INF'

Expand Down
5 changes: 4 additions & 1 deletion spec/serverspec/ubuntu-precise/manifests/default.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

node default {
include jenkins
class {
'jenkins':
cli => true,
}

notice("Hello world from ${::hostname}}")
}
4 changes: 4 additions & 0 deletions spec/serverspec/ubuntu-precise/precise_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
should be_listening }
end

describe file('/usr/share/jenkins/jenkins-cli.jar') do
it { should be_file }
end

describe service('jenkins') do
it { should be_running }
it { should be_enabled }
Expand Down

0 comments on commit 161b82c

Please sign in to comment.