Rush has submitted this change and it was merged.
Change subject: Abstracts Sprint install with defined resource type
phabricator::libext
......................................................................
Abstracts Sprint install with defined resource type phabricator::libext
Change-Id: If2e66a090581e10e350f3e7f9795e3b43c6b25da
---
M manifests/role/phabricator.pp
M modules/phabricator/manifests/init.pp
A modules/phabricator/manifests/libext.pp
3 files changed, 48 insertions(+), 0 deletions(-)
Approvals:
Rush: Verified; Looks good to me, approved
diff --git a/manifests/role/phabricator.pp b/manifests/role/phabricator.pp
index 21a516f..90e564b 100644
--- a/manifests/role/phabricator.pp
+++ b/manifests/role/phabricator.pp
@@ -124,6 +124,10 @@
git_tag => $current_tag,
lock_file => '/var/run/phab_repo_lock',
auth_type => 'local',
+ libext_tag => 'HEAD',
+ libraries => {
+ 'burndown' => '/srv/phab/libext/Sprint',
+ },
extension_tag => 'HEAD',
extensions => ['SecurityPolicyEnforcerAction.php'],
settings => {
diff --git a/modules/phabricator/manifests/init.pp
b/modules/phabricator/manifests/init.pp
index bb10388..4d7ea55 100644
--- a/modules/phabricator/manifests/init.pp
+++ b/modules/phabricator/manifests/init.pp
@@ -43,6 +43,9 @@
# [*auth_type*]
# Specify a template to match the provided login mechanisms
#
+# [*libext_tag*]
+# Track extension revision
+#
# [*extension_tag*]
# Track extension revision
#
@@ -67,6 +70,8 @@
$timezone = 'America/Los_Angeles',
$lock_file = '',
$git_tag = 'HEAD',
+ $libext_tag = '',
+ $libraries = {},
$extension_tag = '',
$extensions = [],
$settings = {},
@@ -154,6 +159,23 @@
notify => Exec["ensure_lock_${lock_file}"],
}
+ if ($libext_tag) {
+
+ file { "${phabdir}/libext":
+ ensure => 'directory',
+ }
+
+ $phab_settings['load-libraries'] = $libraries
+
+ $libext_lock_path = "${phabdir}/library_lock_${libext_tag}"
+
+ phabricator::libext { 'Sprint':
+ rootdir => $phabdir,
+ libext_tag => $libext_tag,
+ libext_lock_path => $libext_lock_path,
+ }
+ }
+
if ($extension_tag) {
$ext_lock_path = "${phabdir}/extension_lock_${extension_tag}"
diff --git a/modules/phabricator/manifests/libext.pp
b/modules/phabricator/manifests/libext.pp
new file mode 100644
index 0000000..d551226
--- /dev/null
+++ b/modules/phabricator/manifests/libext.pp
@@ -0,0 +1,22 @@
+# == Define: phabricator::libext
+#
+# Installs libphutil library extensions
+#
+
+define phabricator::libext ($rootdir, $libext_tag, $libext_lock_path, $libname
= $name) {
+
+ git::install { "phabricator/extensions/${libname}" :
+ directory => "${rootdir}/libext/${libname}",
+ git_tag => $libext_tag,
+ lock_file => $libext_lock_path,
+ notify => Exec[$libext_lock_path],
+ before => Git::Install['phabricator/phabricator'],
+ }
+
+ exec {$libext_lock_path:
+ command => "touch ${libext_lock_path}",
+ unless => "test -z ${libext_lock_path} || test -e
${libext_lock_path}",
+ path => '/usr/bin:/bin',
+ }
+}
+
--
To view, visit https://gerrit.wikimedia.org/r/162873
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If2e66a090581e10e350f3e7f9795e3b43c6b25da
Gerrit-PatchSet: 9
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Christopher Johnson (WMDE) <[email protected]>
Gerrit-Reviewer: Christopher Johnson (WMDE) <[email protected]>
Gerrit-Reviewer: JanZerebecki <[email protected]>
Gerrit-Reviewer: Rush <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits