Skip to content

Commit

Permalink
Update vcsrepo to b02a409d141e70b93fe39df84ec3217cbb60ec0f
Browse files Browse the repository at this point in the history
b02a409d141e70b93fe39df84ec3217cbb60ec0f Merge pull request redhat-openstack#241 from tykeal/master
126a2bde0ba826d334df04725c062a286e354105 Merge pull request redhat-openstack#237 from cmurphy/rspec-puppet-2
7aab800dff04c485308edd906ce234e83ffb154e Merge pull request redhat-openstack#224 from puppet-by-examples/single-branch
a618f2be009b44df5fe91a1d6863bb55bc50020f Clean up puppet lint warnings
7dc0025a0c8f3ddea12bf642a69a62e22daef071 Update .travis.yml
6ec1fc6a118579c4983aecf5275dbfdd00f59392 Keep testing on puppet 2.7
1089bf192413a9b6f64d1087cc623d6532477337 Unpin rspec-puppet and remove unneeded deps
28f8646e4669bacf7a87ffc8694715333355cd32 Use branch parameter

Change-Id: Ib4628208b5e8530c42270a18448124f8efebbad9
  • Loading branch information
xbezdick committed Apr 30, 2015
1 parent 397b36b commit e5f3e0a
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ mod 'tuskar',
:git => 'https://github.com/stackforge/puppet-tuskar.git'

mod 'vcsrepo',
:commit => '210ca5acd8eecc909eae248745e24f0debd66ffc',
:commit => 'b02a409d141e70b93fe39df84ec3217cbb60ec0f',
:git => 'https://github.com/puppetlabs/puppetlabs-vcsrepo.git'

mod 'vlan',
Expand Down
5 changes: 5 additions & 0 deletions vcsrepo/.sync.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
.travis.yml:
script: "\"bundle exec rake spec SPEC_OPTS='--format documentation'\""
extras:
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
Rakefile:
unmanaged: true
spec/spec_helper.rb:
Expand Down
19 changes: 15 additions & 4 deletions vcsrepo/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
---
sudo: false
language: ruby
bundler_args: --without system_tests
script: "bundle exec rake spec SPEC_OPTS='--format documentation'"
matrix:
fast_finish: true
include:
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.4.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.0.0
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
- rvm: 2.1.5
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.1.5
env: PUPPET_GEM_VERSION="~> 3.4.0"
- rvm: 2.1.5
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
notifications:
email: false
3 changes: 0 additions & 3 deletions vcsrepo/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ def location_for(place, fake_version = nil)
end

group :development, :unit_tests do
gem 'rake', :require => false
gem 'rspec-core', '3.1.7', :require => false
gem 'rspec-puppet', '~> 1.0', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', :require => false
gem 'simplecov', :require => false
gem 'puppet_facts', :require => false
gem 'json', :require => false
Expand Down
4 changes: 2 additions & 2 deletions vcsrepo/examples/p4/create_client.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
vcsrepo { '/tmp/vcstest/p4_client_root':
ensure => present,
provider => 'p4',
ensure => present,
provider => 'p4',
}
4 changes: 2 additions & 2 deletions vcsrepo/examples/p4/delete_client.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
vcsrepo { '/tmp/vcstest/p4_client_root':
ensure => absent,
provider => 'p4',
ensure => absent,
provider => 'p4',
}
6 changes: 3 additions & 3 deletions vcsrepo/examples/p4/latest_client.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
vcsrepo { '/tmp/vcstest/p4_client_root':
ensure => latest,
provider => 'p4',
source => '//depot/...',
ensure => latest,
provider => 'p4',
source => '//depot/...',
}
8 changes: 4 additions & 4 deletions vcsrepo/examples/p4/sync_client.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
vcsrepo { '/tmp/vcstest/p4_client_root':
ensure => present,
provider => 'p4',
source => '//depot/...',
revision => '30',
ensure => present,
provider => 'p4',
source => '//depot/...',
revision => '30',
}
5 changes: 4 additions & 1 deletion vcsrepo/lib/puppet/provider/vcsrepo/git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

commands :git => 'git'

has_features :bare_repositories, :reference_tracking, :ssh_identity, :multiple_remotes, :user, :depth, :submodules
has_features :bare_repositories, :reference_tracking, :ssh_identity, :multiple_remotes, :user, :depth, :branch, :submodules

def create
if @resource.value(:revision) and @resource.value(:ensure) == :bare
Expand Down Expand Up @@ -181,6 +181,9 @@ def clone_repository(source, path)
if @resource.value(:depth) and @resource.value(:depth).to_i > 0
args.push('--depth', @resource.value(:depth).to_s)
end
if @resource.value(:branch)
args.push('--branch', @resource.value(:branch).to_s)
end
if @resource.value(:ensure) == :bare
args << '--bare'
end
Expand Down
7 changes: 7 additions & 0 deletions vcsrepo/lib/puppet/type/vcsrepo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
feature :depth,
"The provider can do shallow clones"

feature :branch,
"The name of the branch"

feature :p4config,
"The provider understands Perforce Configuration"

Expand Down Expand Up @@ -207,6 +210,10 @@ def retrieve
desc "The value to be used to do a shallow clone."
end

newparam :branch, :required_features => [:branch] do
desc "The name of the branch to clone."
end

newparam :p4config, :required_features => [:p4config] do
desc "The Perforce P4CONFIG environment."
end
Expand Down

0 comments on commit e5f3e0a

Please sign in to comment.