Merge "Fix groups-dev portal update sync issue"
This commit is contained in:
commit
af4d1dfd46
@ -188,27 +188,38 @@ class drupal (
|
|||||||
|
|
||||||
# add site distro tarball from http repository including
|
# add site distro tarball from http repository including
|
||||||
# md5 hash file
|
# md5 hash file
|
||||||
exec { "download:${package_branch}.tar.gz":
|
exec { "download:${package_branch}.md5":
|
||||||
command => "/usr/bin/wget ${package_repository}/${package_branch}.tar.gz -O /srv/downloads/${package_branch}.tar.gz",
|
command => "/usr/bin/wget --timestamping ${package_repository}/${package_branch}.md5 -O /tmp/${package_branch}.md5",
|
||||||
creates => "/srv/downloads/${package_branch}.tar.gz",
|
|
||||||
logoutput => 'on_failure',
|
logoutput => 'on_failure',
|
||||||
require => File['/srv/downloads'],
|
cwd => '/tmp'
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { "download:${package_branch}.md5":
|
file { "/srv/downloads/${package_branch}.md5":
|
||||||
command => "/usr/bin/wget ${package_repository}/${package_branch}.md5 -O /srv/downloads/${package_branch}.md5",
|
ensure => present,
|
||||||
creates => "/srv/downloads/${package_branch}.md5",
|
source => "/tmp/${package_branch}.md5",
|
||||||
logoutput => 'on_failure',
|
owner => 'root',
|
||||||
require => [ Exec["download:${package_branch}.tar.gz"] ],
|
group => 'root',
|
||||||
|
mode => '0644',
|
||||||
|
require => [ Exec["download:${package_branch}.md5"], File['/srv/downloads'] ]
|
||||||
|
}
|
||||||
|
|
||||||
|
exec { "download:${package_branch}.tar.gz":
|
||||||
|
command => "/usr/bin/wget ${package_repository}/${package_branch}.tar.gz -O /srv/downloads/${package_branch}.tar.gz",
|
||||||
|
logoutput => 'on_failure',
|
||||||
|
refreshonly => true,
|
||||||
|
subscribe => File["/srv/downloads/${package_branch}.md5"],
|
||||||
|
require => File['/srv/downloads'],
|
||||||
}
|
}
|
||||||
|
|
||||||
# deploy a site from scratch when site status is 'NOT INSTALLED'
|
# deploy a site from scratch when site status is 'NOT INSTALLED'
|
||||||
exec { "sitedeploy-${site_name}":
|
exec { "sitedeploy-${site_name}":
|
||||||
command => "/usr/bin/drush dsd-init @${site_alias} /srv/downloads/${package_branch}.tar.gz",
|
command => "/usr/bin/drush dsd-init @${site_alias} /srv/downloads/${package_branch}.tar.gz",
|
||||||
logoutput => true,
|
logoutput => true,
|
||||||
timeout => 600,
|
timeout => 600,
|
||||||
onlyif => "/usr/bin/drush dsd-status @${site_alias} | /bin/grep -c 'NOT INSTALLED'",
|
onlyif => "/usr/bin/drush dsd-status @${site_alias} | /bin/grep -c 'NOT INSTALLED'",
|
||||||
require => [
|
refreshonly => true,
|
||||||
|
subscribe => File["/srv/downloads/${package_branch}.md5"],
|
||||||
|
require => [
|
||||||
Exec["download:${package_branch}.md5"],
|
Exec["download:${package_branch}.md5"],
|
||||||
File['/etc/drush/aliases.drushrc.php'],
|
File['/etc/drush/aliases.drushrc.php'],
|
||||||
]
|
]
|
||||||
@ -216,13 +227,16 @@ class drupal (
|
|||||||
|
|
||||||
# update the site into a new slot when a remote update available
|
# update the site into a new slot when a remote update available
|
||||||
exec { "siteupdate-${site_name}":
|
exec { "siteupdate-${site_name}":
|
||||||
command => "/usr/bin/drush dsd-update @${site_alias} /srv/downloads/${package_branch}.tar.gz",
|
command => "/usr/bin/drush dsd-update @${site_alias} /srv/downloads/${package_branch}.tar.gz",
|
||||||
logoutput => true,
|
logoutput => true,
|
||||||
timeout => 600,
|
timeout => 600,
|
||||||
onlyif => "/usr/bin/drush dsd-status @${site_alias} | /bin/grep -c 'UPDATE'",
|
onlyif => "/usr/bin/drush dsd-status @${site_alias} | /bin/grep -c 'UPDATE'",
|
||||||
require => [
|
refreshonly => true,
|
||||||
|
subscribe => File["/srv/downloads/${package_branch}.md5"],
|
||||||
|
require => [
|
||||||
Exec["download:${package_branch}.md5"],
|
Exec["download:${package_branch}.md5"],
|
||||||
File['/etc/drush/aliases.drushrc.php'],
|
File['/etc/drush/aliases.drushrc.php'],
|
||||||
|
Exec["sitedeploy-${site_name}"],
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user