vcsrepo
Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x
- Puppet >= 6.0.0 < 8.0.0
- , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppetlabs-vcsrepo', '5.0.0'
Learn more about managing modules with a PuppetfileDocumentation
vcsrepo
Table of contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with vcsrepo
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Overview
The vcsrepo module lets you use Puppet to easily deploy content from your version control system (VCS).
Module description
The vcsrepo module provides a single type with providers to support the following version control systems:
Note: git
is the only vcs provider officially supported by Puppet Inc.
Setup
Setup requirements
The vcsrepo module does not install any VCS software for you. You must install a VCS before you can use this module.
Like Puppet in general, the vcsrepo module does not automatically create parent directories for the files it manages. Set up any needed directory structures before you start.
Beginning with vcsrepo
To create and manage a blank repository, define the type vcsrepo
with a path to your repository and supply the provider
parameter based on the VCS you're using.
vcsrepo { '/path/to/repo':
ensure => present,
provider => git,
}
Usage
Note: git
is the only vcsrepo provider officially supported by Puppet Inc.
Git
Create a blank repository
To create a blank repository suitable for use as a central repository, define vcsrepo
without source
or revision
:
vcsrepo { '/path/to/repo':
ensure => present,
provider => git,
}
If you're managing a central or official repository, you might want to make it a bare repository. To do this, set ensure
to 'bare':
vcsrepo { '/path/to/repo':
ensure => bare,
provider => git,
}
Clone/pull a repository
vcsrepo { '/path/to/repo':
ensure => present,
provider => git,
source => 'git://example.com/repo.git',
}
To clone your repository as bare or mirror, you can set ensure
to 'bare' or 'mirror':
vcsrepo { '/path/to/repo':
ensure => mirror,
provider => git,
source => 'git://example.com/repo.git',
}
By default, vcsrepo
will use the HEAD of the source repository's main branch. To use another branch or a specific commit, set revision
to either a branch name or a commit SHA or tag.
Branch name:
vcsrepo { '/path/to/repo':
ensure => present,
provider => git,
source => 'git://example.com/repo.git',
revision => 'development',
}
SHA:
vcsrepo { '/path/to/repo':
ensure => present,
provider => git,
source => 'git://example.com/repo.git',
revision => '0c466b8a5a45f6cd7de82c08df2fb4ce1e920a31',
}
Tag:
vcsrepo { '/path/to/repo':
ensure => present,
provider => git,
source => 'git://example.com/repo.git',
revision => '1.1.2rc1',
}
To check out a branch as a specific user, supply the user
parameter:
vcsrepo { '/path/to/repo':
ensure => present,
provider => git,
source => 'git://example.com/repo.git',
revision => '0c466b8a5a45f6cd7de82c08df2fb4ce1e920a31',
user => 'someUser',
}
To keep local changes while changing revision, use the keep_local_changes
:
vcsrepo { '/path/to/repo':
ensure => present,
provider => git,
source => 'git://example.com/repo.git',
revision => '0c466b8a5a45f6cd7de82c08df2fb4ce1e920a31',
keep_local_changes => true,
user => 'someUser',
}
To keep the repository at the latest revision, set ensure
to 'latest'.
WARNING: This overwrites any local changes to the repository.
vcsrepo { '/path/to/repo':
ensure => latest,
provider => git,
source => 'git://example.com/repo.git',
revision => 'main',
}
To clone the repository but skip initializing submodules, set submodules
to 'false':
vcsrepo { '/path/to/repo':
ensure => latest,
provider => git,
source => 'git://example.com/repo.git',
submodules => false,
}
To clone the repository and trust the server certificate (sslVerify=false), set trust_server_cert
to 'true':
vcsrepo { '/path/to/repo':
ensure => present,
provider => git,
source => 'git://example.com/repo.git',
trust_server_cert => true,
}
Use multiple remotes with a repository
In place of a single string, you can set source
to a hash of one or more name => URL pairs:
vcsrepo { '/path/to/repo':
ensure => present,
provider => git,
remote => 'origin'
source => {
'origin' => 'https://github.com/puppetlabs/puppetlabs-vcsrepo.git',
'other_remote' => 'https://github.com/other_user/puppetlabs-vcsrepo.git'
},
}
Note: If you set source
to a hash, one of the names you specify must match the value of the remote
parameter. That remote serves as the upstream of your managed repository.
Connect via SSH
To connect to your source repository via SSH (such as 'username@server:…'), we recommend managing your SSH keys with Puppet and using the require
metaparameter to make sure they are present before the vcsrepo
resource is applied.
To use SSH keys associated with a user, specify the username in the user
parameter:
vcsrepo { '/path/to/repo':
ensure => latest,
provider => git,
source => 'ssh://username@example.com/repo.git',
user => 'toto', #uses toto's $HOME/.ssh setup
require => File['/home/toto/.ssh/id_rsa'],
}
To use SSH over a nonstandard port, use the full SSH scheme and include the port number:
vcsrepo { '/path/to/repo':
ensure => latest,
provider => git,
source => 'ssh://username@example.com:7999/repo.git',
}
Bazaar
Create a blank repository
To create a blank repository, suitable for use as a central repository, define vcsrepo
without source
or revision
:
vcsrepo { '/path/to/repo':
ensure => present,
provider => bzr,
}
Branch from an existing repository
vcsrepo { '/path/to/repo':
ensure => present,
provider => bzr,
source => '/some/path',
}
To branch from a specific revision, set revision
to a valid Bazaar revision spec:
vcsrepo { '/path/to/repo':
ensure => present,
provider => bzr,
source => '/some/path',
revision => 'menesis@pov.lt-20100309191856-4wmfqzc803fj300x',
}
Connect via SSH
To connect to your source repository via SSH (such as 'bzr+ssh://...'
or 'sftp://...,'
), we recommend using the require
metaparameter to make sure your SSH keys are present before the vcsrepo
resource is applied:
vcsrepo { '/path/to/repo':
ensure => latest,
provider => bzr,
source => 'bzr+ssh://bzr.example.com/some/path',
user => 'toto', #uses toto's $HOME/.ssh setup
require => File['/home/toto/.ssh/id_rsa'],
}
CVS
Create a blank repository
To create a blank repository suitable for use as a central repository, define vcsrepo
without source
or revision
:
vcsrepo { '/path/to/repo':
ensure => present,
provider => cvs,
}
Checkout/update from a repository
vcsrepo { '/path/to/workspace':
ensure => present,
provider => cvs,
source => ':pserver:anonymous@example.com:/sources/myproj',
}
To get a specific module on the current mainline, supply the module
parameter:
vcsrepo { '/vagrant/lockss-daemon-source':
ensure => present,
provider => cvs,
source => ':pserver:anonymous@lockss.cvs.sourceforge.net:/cvsroot/lockss',
module => 'lockss-daemon',
}
To set the GZIP compression levels for your repository history, use the compression
parameter:
vcsrepo { '/path/to/workspace':
ensure => present,
provider => cvs,
compression => 3,
source => ':pserver:anonymous@example.com:/sources/myproj',
}
To get a specific revision, set revision
to the revision number.
vcsrepo { '/path/to/workspace':
ensure => present,
provider => cvs,
compression => 3,
source => ':pserver:anonymous@example.com:/sources/myproj',
revision => '1.2',
}
You can also set revision
to a tag:
vcsrepo { '/path/to/workspace':
ensure => present,
provider => cvs,
compression => 3,
source => ':pserver:anonymous@example.com:/sources/myproj',
revision => 'SOMETAG',
}
Connect via SSH
To connect to your source repository via SSH, we recommend using the require
metaparameter to make sure your SSH keys are present before the vcsrepo
resource is applied:
vcsrepo { '/path/to/repo':
ensure => latest,
provider => cvs,
source => ':pserver:anonymous@example.com:/sources/myproj',
user => 'toto', #uses toto's $HOME/.ssh setup
require => File['/home/toto/.ssh/id_rsa'],
}
Mercurial
Create a blank repository
To create a blank repository suitable for use as a central repository, define vcsrepo
without source
or revision
:
vcsrepo { '/path/to/repo':
ensure => present,
provider => hg,
}
Clone/pull and update a repository
To get the default branch tip:
vcsrepo { '/path/to/repo':
ensure => present,
provider => hg,
source => 'http://hg.example.com/myrepo',
}
For a specific changeset, use revision
:
vcsrepo { '/path/to/repo':
ensure => present,
provider => hg,
source => 'http://hg.example.com/myrepo',
revision => '21ea4598c962',
}
You can also set revision
to a tag:
vcsrepo { '/path/to/repo':
ensure => present,
provider => hg,
source => 'http://hg.example.com/myrepo',
revision => '1.1.2',
}
To check out as a specific user:
vcsrepo { '/path/to/repo':
ensure => present,
provider => hg,
source => 'http://hg.example.com/myrepo',
user => 'user',
}
To specify an SSH identity key:
vcsrepo { '/path/to/repo':
ensure => present,
provider => hg,
source => 'ssh://hg@hg.example.com/myrepo',
identity => '/home/user/.ssh/id_dsa1',
}
To specify a username and password for HTTP Basic authentication:
vcsrepo { '/path/to/repo':
ensure => latest,
provider => hg,
source => 'http://hg.example.com/myrepo',
basic_auth_username => 'hgusername',
basic_auth_password => 'hgpassword',
}
Connect via SSH
To connect to your source repository via SSH (such as 'ssh://...'
), we recommend using the require
metaparameter to make sure your SSH keys are present before the vcsrepo
resource is applied:
vcsrepo { '/path/to/repo':
ensure => latest,
provider => hg,
source => 'ssh://hg.example.com//path/to/myrepo',
user => 'toto', #uses toto's $HOME/.ssh setup
require => File['/home/toto/.ssh/id_rsa'],
}
Perforce
Create an empty workspace
To set up the connection to your Perforce service, set p4config
to the location of a valid Perforce config file stored on the node:
vcsrepo { '/path/to/repo':
ensure => present,
provider => p4,
p4config => '/root/.p4config'
}
Note: If you don't include the P4CLIENT
setting in your config file, the provider generates a workspace name based on the digest of path
and the node's hostname (such as puppet-91bc00640c4e5a17787286acbe2c021c
).
Create/update and sync a Perforce workspace
To sync a depot path to head, set ensure
to 'latest':
vcsrepo { '/path/to/repo':
ensure => latest,
provider => p4,
source => '//depot/branch/...'
}
To sync to a specific changelist, specify its revision number with the revision
parameter:
vcsrepo { '/path/to/repo':
ensure => present,
provider => p4,
source => '//depot/branch/...',
revision => '2341'
}
You can also set revision
to a label:
vcsrepo { '/path/to/repo':
ensure => present,
provider => p4,
source => '//depot/branch/...',
revision => 'my_label'
}
Subversion
Create a blank repository
vcsrepo { '/path/to/repo':
ensure => present,
provider => svn,
}
Check out from an existing repository
Provide a source
pointing to the branch or tag you want to check out:
vcsrepo { '/path/to/repo':
ensure => present,
provider => svn,
source => 'svn://svnrepo/hello/branches/foo',
}
You can also designate a specific revision:
vcsrepo { '/path/to/repo':
ensure => present,
provider => svn,
source => 'svn://svnrepo/hello/branches/foo',
revision => '1234',
}
####Checking out only specific paths
Note: The includes
param is only supported when subversion client version is >= 1.6.
You can check out only specific paths in a particular repository by providing their relative paths to the includes
parameter, like so:
vcsrepo { '/path/to/repo':
ensure => present,
provider => svn,
source => 'http://svnrepo/hello/trunk',
includes => [
'root-file.txt',
'checkout-folder',
'file/this-file.txt',
'folder/this-folder/',
]
}
This will create files /path/to/repo/file-at-root-path.txt
and /path/to/repo/file/nested/within/repo.jmx
, with folders /path/to/repo/some-folder
and /path/to/repo/nested/folder/to/checkout
completely recreating their corresponding working tree path.
When specified, the depth
parameter will also be applied to the includes
-- the root directory will be checked out using an empty
depth, and the includes
you specify will be checked out using the depth
you provide.
To illustrate this point, using the above snippet (with the specified includes
) and a remote repository layout like this:
.
├── checkout-folder
│ ├── file1
│ └── nested-1
│ ├── nested-2
│ │ └── nested-file-2
│ └── nested-file-1
├── file
│ ├── NOT-this-file.txt
│ └── this-file.txt
├── folder
│ ├── never-checked-out
│ └── this-folder
│ ├── deep-nested-1
│ │ ├── deep-nested-2
│ │ │ └── deep-nested-file-2
│ │ └── deep-nested-file-1
│ └── this-file.txt
├── NOT-this-file.txt
├── NOT-this-folder
│ ├── NOT-this-file.txt
│ └── NOT-this-one-either.txt
└── root-file.txt
With no depth
given, your local folder /path/to/repo
will look like this:
.
├── checkout-folder
│ ├── file1
│ └── nested-1
│ ├── nested-2
│ │ └── nested-file-2
│ └── nested-file-1
├── file
│ └── this-file.txt
├── folder
│ └── this-folder
│ ├── deep-nested-1
│ │ ├── deep-nested-2
│ │ │ └── deep-nested-file-2
│ │ └── deep-nested-file-1
│ └── this-file.txt
└── root-file.txt
And with a depth
of files
will look like this:
.
├── checkout-folder
│ └── file1
├── file
│ └── this-file.txt
├── folder
│ └── this-folder
│ └── this-file.txt
└── root-file.txt
####Use a specific Subversion configuration directory
Use the configuration
parameter to designate the directory that contains your Subversion configuration files (typically, '/path/to/.subversion'):
vcsrepo { '/path/to/repo':
ensure => present,
provider => svn,
source => 'svn://svnrepo/hello/branches/foo',
configuration => '/path/to/.subversion',
}
Connect via SSH
To connect to your source repository via SSH (such as 'svn+ssh://...'
), we recommend using the require
metaparameter to make sure your SSH keys are present before the vcsrepo
resource is applied:
vcsrepo { '/path/to/repo':
ensure => latest,
provider => svn,
source => 'svn+ssh://svnrepo/hello/branches/foo',
user => 'toto', #uses toto's $HOME/.ssh setup
require => File['/home/toto/.ssh/id_rsa'],
}
Reference
Type: vcsrepo
The vcsrepo module adds only one type with several providers.
For information on the classes and types, see the REFERENCE.md
Providers
Note: Not all features are available with all providers.
git
- Supports the Git VCS.
Features: bare_repositories
, depth
, multiple_remotes
, reference_tracking
, ssh_identity
, submodules
, user
Parameters: depth
, ensure
, excludes
, force
, group
, identity
, owner
, path
, provider
, remote
, revision
, source
, user
bzr
- Supports the Bazaar VCS.
Features: reference_tracking
Parameters: ensure
, excludes
, force
, group
, owner
, path
, provider
, revision
, source
cvs
- Supports the CVS VCS.
Features: cvs_rsh
, gzip_compression
, modules
, reference_tracking
, user
Parameters: compression
, cvs_rsh
, ensure
, excludes
, force
, group
, module
, owner
, path
, provider
hg
- Supports the Mercurial VCS.
Features: reference_tracking
, ssh_identity
, user
Parameters: ensure
, excludes
, force
, group
, identity
, owner
, path
, provider
, revision
, source
, user
p4
- Supports the Perforce VCS.
Features: p4config
, reference_tracking
Parameters: ensure
, excludes
, force
, group
, owner
, p4config
, path
, provider
, revision
, source
svn
- Supports the Subversion VCS.
Features: basic_auth
, configuration
, conflict
, depth
, filesystem_types
, reference_tracking
Parameters: basic_auth_password
, basic_auth_username
, configuration
, conflict
, ensure
, excludes
, force
, fstype
, group
, includes
, owner
, path
, provider
, revision
, source
, trust_server_cert
Features
Note: Not all features are available with all providers.
bare_repositories
- Differentiates between bare repositories and those with working copies. (Available withgit
.)basic_auth
- Supports HTTP Basic authentication. (Available withhg
andsvn
.)conflict
- Lets you decide how to resolve any conflicts between the source repository and your working copy. (Available withsvn
.)configuration
- Lets you specify the location of your configuration files. (Available withsvn
.)cvs_rsh
- Understands theCVS_RSH
environment variable. (Available withcvs
.)depth
- Supports shallow clones ingit
or sets the scope limit insvn
. (Available withgit
andsvn
.)filesystem_types
- Supports multiple types of filesystem. (Available withsvn
.)gzip_compression
- Supports explicit GZip compression levels. (Available withcvs
.)include_paths
- Lets you checkout only certain paths. (Available withsvn
.)modules
- Lets you choose a specific repository module. (Available withcvs
.)multiple_remotes
- Tracks multiple remote repositories. (Available withgit
.)reference_tracking
- Lets you track revision references that can change over time (e.g., some VCS tags and branch names). (Available with all providers)ssh_identity
- Lets you specify an SSH identity file. (Available withgit
andhg
.)user
- Can run as a different user. (Available withgit
,hg
andcvs
.)p4config
- Supports setting theP4CONFIG
environment. (Available withp4
.)submodules
- Supports repository submodules which can be optionally initialized. (Available withgit
.)
Limitations
Git is the only VCS provider officially supported by Puppet Inc. Git with 3.18 changes the maximum enabled TLS protocol version, this breaks some HTTPS functionality on older operating systems. They are Enterprise Linux 5 and OracleLinux 6.
The includes parameter is only supported when SVN client version is >= 1.6.
For an extensive list of supported operating systems, see metadata.json
Development
Puppet Inc. modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can't access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
You can read the complete module contribution guide on the Puppet documentation site.
Reference
Table of Contents
Resource types
vcsrepo
: A local version control repository
Resource types
vcsrepo
A local version control repository
Properties
The following properties are available in the vcsrepo
type.
ensure
Valid values: present
, bare
, mirror
, absent
, latest
Ensure the version control repository.
includes
Paths to be included from the repository
module
The repository module to manage
revision
Valid values: %r{^\S+$}
The revision of the repository
source
The source URI for the repository
Parameters
The following parameters are available in the vcsrepo
type.
basic_auth_password
basic_auth_username
branch
compression
configuration
conflict
cvs_rsh
depth
excludes
force
fstype
group
identity
keep_local_changes
owner
p4config
path
provider
remote
submodules
trust_server_cert
user
basic_auth_password
HTTP Basic Auth password
basic_auth_username
HTTP Basic Auth username
branch
The name of the branch to clone.
compression
Compression level
configuration
The configuration directory to use
conflict
The action to take if conflicts exist between repository and working copy
cvs_rsh
The value to be used for the CVS_RSH environment variable.
depth
The value to be used to do a shallow clone.
excludes
Local paths which shouldn't be tracked by the repository
force
Valid values: true
, false
, yes
, no
Force repository creation, destroying any files on the path in the process.
Default value: false
fstype
Filesystem type
group
The group/gid that owns the repository files
identity
SSH identity file
keep_local_changes
Valid values: true
, false
Keep local changes on files tracked by the repository when changing revision
Default value: false
owner
The user/uid that owns the repository files
p4config
The Perforce P4CONFIG environment.
path
namevar
Absolute path to repository
provider
The specific backend to use for this vcsrepo
resource. You will seldom need to specify this --- Puppet will usually
discover the appropriate provider for your platform.
remote
The remote repository to track
Default value: origin
submodules
Valid values: true
, false
Initialize and update each submodule in the repository.
Default value: true
trust_server_cert
Valid values: true
, false
Trust server certificate
Default value: false
user
The user to run for repository operations
Change log
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v5.0.0 (2021-06-02)
Changed
v4.0.0 (2021-03-03)
Changed
- pdksync - Remove Puppet 5 from testing and bump minimal version to 6.0.0 #491 (carabasdaniel)
v3.2.1 (2021-02-16)
Fixed
v3.2.0 (2021-01-20)
Added
- pdksync - (feat) - Add support for Puppet 7 #476 (daianamezdrea)
- pdksync - (IAC-973) - Update travis/appveyor to run on new default branch
main
#466 (david22swan)
Fixed
- [MODULES-10857] Rename exist function to exists in cvs.rb #484 (carabasdaniel)
- (IAC-1223) Correct clone https test #471 (pmcmaw)
- check if pass containes non-ASCII chars before provider is created #464 (adrianiurca)
v3.1.1 (2020-06-26)
Fixed
- prevent ANSI color escape sequences from messing up git output #458 (kenyon)
- Unset GIT_SSH_COMMAND before exec'ing git command #435 (mzagrabe)
v3.1.0 (2019-12-10)
Added
- (FM-8234) Port to Litmus #429 (sheenaajay)
- pdksync - Add support on Debian10 #428 (lionce)
- feature(git): add keep local changes option #425 (jfroche)
Fixed
v3.0.0 (2019-06-13)
Changed
- pdksync - (MODULES-8444) - Raise lower Puppet bound #413 (david22swan)
Added
- (FM-8035) Add RedHat 8 support #419 (eimlav)
- (MODULES-8738) Allow Sensitive value for basic_auth_password #416 (eimlav)
- (MODULES-8140) - Add SLES 15 support #399 (eimlav)
Fixed
- MODULES-8910 fix for failing git install using RepoForge instead of epel #414 (Lavinia-Dan)
- (maint) Add HTML anchor tag #404 (clairecadman)
- pdksync - (FM-7655) Fix rubygems-update for ruby \< 2.3 #401 (tphoney)
2.4.0 (2018-09-28)
Added
- pdksync - (FM-7392) - Puppet 6 Testing Changes #394 (pmcmaw)
- pdksync - (MODULES-6805) metadata.json shows support for puppet 6 #393 (tphoney)
- pdksync - (MODULES-7658) use beaker4 in puppet-module-gems #390 (tphoney)
- (MODULES-7467) Update Vcsrepo to support Ubuntu 18.04 #382 (david22swan)
Fixed
- (MODULES-7009) Do not run HTTPS tests on old OSes #384 (tphoney)
- Improve Git performance when using SHA revisions #380 (vpierson)
- [FM-6957] Removing unsupported OS from Vcsrepo #378 (david22swan)
- Avoid popup on macOS when developer tools aren't installed #367 (girardc79)
2.3.0
This release uses the PDK convert functionality which in return makes the module PDK compliant. It also includes a few features and a roll up of maintenance changes.
Added
- Added trust_server_cert support to Git provider (MODULES-5889).
- Do not ignore incorrect HTTP Basic auth property specifications.
- Adds some basic unit tests (MODULES-5889).
Fixed
- Addressing Rubocop errors throughout the module.
- Change expected exception type from Puppet::Error to RuntimeError.
- A typo in the CHANGELOG.md.
- A roll up of minor changes via modulesync_configs.
Removed
gem update bundler
as the module runs into (MODULES-6339).
Supported Release 2.2.0
Summary
This is to enable Rubocop within the module.
Added
- Rubocop has been enabled and will now run against all future pull requests.
Fixed
- Entire module has been put through the rubocop process and now matches the expected standards.
Supported Release 2.1.0
Summary
This is to provide a clean release from which to run Rubocop.
Added
- Debian 9 as supported platform
Fixed
- CVS working copy detection (MODULES-5704)
- typo error for sshed-git-source
- Update to existence test, Use 'svn info' instead of 'svn status'. 'svn status' does not return proper exit codes, while 'svn info' does.
- working_copy_exists in svn provider. Change method 'working_copy_exists' to use 'svn info' instead of 'svn status'. 'svn status' does not return proper exit codes, while 'svn info' does. (MODULES-5615)
- tests associated with hg
- hg provider: remove escaped quotes - authentication fix
Removed
- Support for Ubuntu 10.04 and 12.04, existing compatibility is unaffected (MODULES-5501)
- Support for Debian 6 and SLES 10, existing compatibility is unaffected
- Commented out test (MODULES-5162)
Supported Release 2.0.0
Summary
This is a major release that drops support for Puppet 3 and addresses an issue with the subversion provider.
Added
- Documentation for using an non-standard ssh port (MODULES-1910)
- Autorequire for the subversion package in the vcsrepo type (MODULES-4722)
- Puppet 5 support in metadata (MODULES-5144)
Changed
- Lower bound of Puppet requirement to 4.7.0 (MODULES-4823)
Fixed
- Solaris
SSH_AUTH_SOCKET
issue - Issue with subversion provider (MODULES-4280)
force
parameter to return a boolean instead of a string (MODULES-4864)
1.5.0 - 2016-12-19 Supported Release
Summary
Release featuring some refactoring and improvements around git's ensurable
.
Bugfixes
ensure => absent
fix
Features
:source
property added- Improved
ensure
handling for git provider - General refactoring for all providers
- Various test improvements
1.4.0 - 2015-09-06 Supported Release
Summary
Small release for a new feature and added compatibility.
Features
- Git repositories can be cloned as mirror or bare repos.
- Added STDERR to Puppet's output.
- Added Debian 8 and Ubuntu 16.04 compatibility.
1.3.2 - 2015-12-08 Supported Release
Summary
Small release for support of newer PE versions. This increments the version of PE in the metadata.json file.
1.3.1 - 2015-07-28 Supported Release
Summary
This release includes a number of bugfixes and test updates.
Fixed
- Fix for detached HEAD on git 2.4+.
- Git provider doesn't ignore revision property when depth is used (MODULES-2131).
- Tests fixed.
- Check if submodules == true before calling update_submodules.
1.3.0 - 2015-05-19 Supported Release
Summary
This release adds git provider remote handling, svn conflict resolution, and fixes the git provider when /tmp is mounted noexec.
Added
source
property now takes a hash of sources for the git provider's remotes.- Added
submodules
parameter to skip submodule initialization for the git provider. - Added
conflict
to the svn provider to resolve conflicts. - Added
branch
parameter to specify clone branch. - Readme rewritten.
Fixed
- The git provider now works even if
/tmp
is noexec.
1.2.0 - 2014-11-04 Supported Release
Summary
This release includes some improvements for git, mercurial, and cvs providers, and fixes the bug where there were warnings about multiple default providers.
Added
- Update git and mercurial providers to set UID with
Puppet::Util::Execution.execute
instead ofsu
- Allow git excludes to be string or array
- Add
user
feature to cvs provider
Fixed
- No more warnings about multiple default providers! (MODULES-428)
1.1.0 - 2014-07-14 Supported Release
Summary
This release adds a Perforce provider* and corrects the git provider behavior
when using ensure => latest
.
*(Only git provider is currently supported.)
Added
- New Perforce provider.
Fixed
- Fix behavior with
ensure => latest
and detached HEAD. (MODULES-660) - Spec test fixes.
1.0.2 - 2014-06-30 Supported Release
Summary
This supported release adds SLES 11 to the list of compatible OSs and documentation updates for support.
1.0.1 - 2014-06-17 Supported Release
Summary
This release is the first supported release of vcsrepo. The readme has been greatly improved.
Added
- Updated and expanded readme to follow readme template.
Fixed
- Remove SLES from compatability metadata.
- Unpin rspec development dependencies.
- Update acceptance level testing.
1.0.0 - 2014-06-04
Summary
This release focuses on a number of bugfixes, and also has some new features for Bzr and Git.
Added
- Bzr:
- Call set_ownership.
- Git:
- Add ability for shallow clones.
- Use -a and desired for HARD resets.
- Use rev-parse to get tag canonical revision.
Fixed
- HG:
- Only add ssh options when it's talking to the network.
- Git:
- Fix for issue with detached HEAD.
force => true
will now destroy and recreate repo.- Actually use the remote parameter.
- Use origin/main instead of origin/HEAD when on main.
- SVN:
- Fix svnlook behavior with plain directories.
0.2.0 - 2013-11-13
Summary
This release mainly focuses on a number of bugfixes, which should significantly improve the reliability of Git and SVN. Thanks to our many contributors for all of these fixes!
Added
- Git:
- Add autorequire for
Package['git']
. - HG:
- Allow user and identity properties.
- Bzr:
- "ensure => latest" support.
- SVN:
- Added configuration parameter.
- Add support for main svn repositories.
- CVS:
- Allow for setting the CVS_RSH environment variable.
Fixed
- Handle Puppet::Util[::Execution].withenv for 2.x and 3.x properly.
- Change path_empty? to not do full directory listing.
- Overhaul spec tests to work with rspec2.
- Git:
- Improve Git SSH usage documentation.
- Add ssh session timeouts to prevent network issues from blocking runs.
- Fix git provider checkout of a remote ref on an existing repo.
- Allow unlimited submodules (thanks to --recursive).
- Use git checkout --force instead of short -f everywhere.
- Update git provider to handle checking out into an existing (empty) dir.
- SVN:
- Handle force property.
- Adds support for changing upstream repo url.
- Check that the URL of the WC matches the URL from the manifest.
- Changed from using "update" to "switch".
- Handle revision update without source switch.
- Fix svn provider to look for '^Revision:' instead of '^Last Changed Rev:'.
- CVS:
- Documented the "module" attribute.
* This Changelog was automatically generated by github_changelog_generator
GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.