mirror of https://github.com/zulip/zulip.git
puppet: Factor out sentry-cli installation.
This commit is contained in:
parent
62cf6ab35c
commit
528d475053
|
@ -1,24 +1,8 @@
|
||||||
# @summary Install sentry-cli binary and pre/post deploy hooks
|
# @summary Install Sentry pre/post deploy hooks
|
||||||
#
|
#
|
||||||
class zulip::hooks::sentry {
|
class zulip::hooks::sentry {
|
||||||
include zulip::hooks::base
|
include zulip::hooks::base
|
||||||
$version = $zulip::common::versions['sentry-cli']['version']
|
include zulip::sentry_cli
|
||||||
$bin = "/srv/zulip-sentry-cli-${version}"
|
|
||||||
|
|
||||||
$arch = $facts['os']['architecture'] ? {
|
|
||||||
'amd64' => 'x86_64',
|
|
||||||
'aarch64' => 'aarch64',
|
|
||||||
}
|
|
||||||
|
|
||||||
zulip::external_dep { 'sentry-cli':
|
|
||||||
version => $version,
|
|
||||||
url => "https://downloads.sentry-cdn.com/sentry-cli/${version}/sentry-cli-Linux-${arch}",
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/usr/local/bin/sentry-cli':
|
|
||||||
ensure => link,
|
|
||||||
target => $bin,
|
|
||||||
}
|
|
||||||
|
|
||||||
zulip::hooks::file { [
|
zulip::hooks::file { [
|
||||||
'common/sentry.sh',
|
'common/sentry.sh',
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
# @summary Install sentry-cli binary
|
||||||
|
#
|
||||||
|
class zulip::sentry_cli {
|
||||||
|
$version = $zulip::common::versions['sentry-cli']['version']
|
||||||
|
$bin = "/srv/zulip-sentry-cli-${version}"
|
||||||
|
|
||||||
|
$arch = $facts['os']['architecture'] ? {
|
||||||
|
'amd64' => 'x86_64',
|
||||||
|
'aarch64' => 'aarch64',
|
||||||
|
}
|
||||||
|
|
||||||
|
zulip::external_dep { 'sentry-cli':
|
||||||
|
version => $version,
|
||||||
|
url => "https://downloads.sentry-cdn.com/sentry-cli/${version}/sentry-cli-Linux-${arch}",
|
||||||
|
}
|
||||||
|
|
||||||
|
file { '/usr/local/bin/sentry-cli':
|
||||||
|
ensure => link,
|
||||||
|
target => $bin,
|
||||||
|
require => File[$bin],
|
||||||
|
before => Exec['Cleanup sentry-cli'],
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue