Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added package

  • Loading branch information...
commit ff14bd111e2ace9c0d34940a31af484c34e57cf6 1 parent 8564a4a
@crayfishx crayfishx authored
View
BIN  pkg/crayfish-svn-1.0.0.tar.gz
Binary file not shown
View
3  pkg/crayfish-svn-1.0.0/Modulefile
@@ -0,0 +1,3 @@
+name 'crayfish-svn'
+version '1.0.0'
+
View
4 pkg/crayfish-svn-1.0.0/README
@@ -0,0 +1,4 @@
+ubversion
+
+Released 20110608 - Craig Dunn - GPLv2
+
View
115 pkg/crayfish-svn-1.0.0/manifests/init.pp
@@ -0,0 +1,115 @@
+# Class: subversion
+#
+# Manage subversion checkouts
+class subversion {
+
+ package { "subversion":
+ ensure => latest,
+ }
+
+ $svnflags = "--non-interactive"
+
+# Definition: svn::checkout
+#
+# Check out a subversion repository to a working directory
+#
+# Parameters:
+# $repopath - Path to the repository
+# $workingdir - Local working directory to checkout to
+# $ensure (optional) - Set to updated to ensure latest svn update
+# $host (optional) - Subversion server hostname
+# $method (optional) - Protocol to use (http,https,svn..etc)
+# $svnuser (optional) - Username to connect with
+# $password (optional) - Password to connect with
+# $revision (optional) - Revision to check out
+# $trustcert(optional) - Use --trust-server-cert
+#
+#
+# Sample usage
+# subversion::checkout { "application/trunk":
+# repopath => "/app/trunk",
+# workingdir => "/var/src/app",
+# host => "subversion.local",
+# method => "http",
+# svnuser => "application",
+# password => "kjhsdfkj",
+# require => File["/var/src/app"],
+# }
+#
+ define checkout (
+ $repopath,
+ $workingdir,
+ $ensure = "exists",
+ $host = false,
+ $method = false,
+ $svnuser = false,
+ $revision = "HEAD",
+ $password = false,
+ $trustcert = false
+ ) {
+
+
+
+ $urlmethod = $method ? {
+ false => "",
+ default => "$method://"
+ }
+
+ $optuser = $svnuser ? {
+ false => "",
+ default => "--username $svnuser",
+ }
+
+ $urlhost = $host ? {
+ false => "",
+ default => "$host"
+ }
+
+ $optpassword = $password ? {
+ false => "",
+ default => "--password $password"
+ }
+
+ $opttrustcert = $trustcert ? {
+ false => "",
+ default => "--trust-server-cert"
+ }
+
+
+
+
+ $svnurl = "${urlmethod}${urlhost}${repopath}"
+ Exec { path => "/bin:/usr/bin:/usr/local/bin" }
+
+
+ exec { "$svnurl:$workingdir:checkout":
+ cwd => $workingdir,
+ command => "svn checkout $svnflags $optuser $optpassword $opttrustcert -r$revision $svnurl $workingdir",
+ creates => "$workingdir/.svn",
+ require => Package["subversion"],
+ }
+
+
+ if ( $ensure == "updated" ) {
+ exec { "$svnurl:$workingdir:update":
+ cwd => "$workingdir",
+ command => "svn update $svnglags $optuser $optpassword $opttrustcert -r$revision",
+ require => Package["subversion"],
+ }
+ }
+
+
+ }
+
+
+
+}
+
+
+
+
+
+
+
+
+
View
21 pkg/crayfish-svn-1.0.0/metadata.json
@@ -0,0 +1,21 @@
+{
+ "description": "UNKNOWN",
+ "types": [
+
+ ],
+ "checksums": {
+ "README": "4cbb2d56189976bfef1356c2e6633dc8",
+ "Modulefile": "469baaf0d873b27a7a969adbe4b14037",
+ "manifests/init.pp": "74f2983d7b859f0807477bf12a802d4c"
+ },
+ "summary": "UNKNOWN",
+ "source": "UNKNOWN",
+ "author": "crayfish",
+ "version": "1.0.0",
+ "project_page": "UNKNOWN",
+ "license": "UNKNOWN",
+ "dependencies": [
+
+ ],
+ "name": "crayfish-svn"
+}
View
BIN  pkg/puppet-subversion-1.0.tar.gz
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.