mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
puppet: Factor out golang variables.
This commit is contained in:
parent
21be36f15f
commit
93af6c7f06
@ -2,17 +2,21 @@
|
||||
#
|
||||
class zulip::golang {
|
||||
$version = '1.17.3'
|
||||
|
||||
$dir = "/srv/golang-${version}/"
|
||||
$bin = '/srv/golang/bin/go'
|
||||
|
||||
zulip::sha256_tarball_to { 'golang':
|
||||
url => "https://golang.org/dl/go${version}.linux-amd64.tar.gz",
|
||||
sha256 => '550f9845451c0c94be679faf116291e7807a8d78b43149f9506c1b15eb89008c',
|
||||
install => {
|
||||
'go/' => "/srv/golang-${version}/",
|
||||
'go/' => $dir,
|
||||
},
|
||||
}
|
||||
|
||||
file { '/srv/golang':
|
||||
ensure => 'link',
|
||||
target => "/srv/golang-${version}/",
|
||||
target => $dir,
|
||||
require => Zulip::Sha256_tarball_to['golang'],
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ class zulip::profile::smokescreen {
|
||||
},
|
||||
}
|
||||
exec { 'compile smokescreen':
|
||||
command => "/srv/golang/bin/go build -o /usr/local/bin/smokescreen-${version}",
|
||||
command => "${zulip::golang::bin} build -o /usr/local/bin/smokescreen-${version}",
|
||||
cwd => "/srv/smokescreen-src-${version}/",
|
||||
# GOCACHE is required; nothing is written to GOPATH, but it is required to be set
|
||||
environment => ['GOCACHE=/tmp/gocache', 'GOPATH=/root/go'],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user