mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
puppet: Factor out golang variables.
(cherry picked from commit 93af6c7f06)
This commit is contained in:
@@ -2,17 +2,21 @@
|
|||||||
#
|
#
|
||||||
class zulip::golang {
|
class zulip::golang {
|
||||||
$version = '1.17.3'
|
$version = '1.17.3'
|
||||||
|
|
||||||
|
$dir = "/srv/golang-${version}/"
|
||||||
|
$bin = '/srv/golang/bin/go'
|
||||||
|
|
||||||
zulip::sha256_tarball_to { 'golang':
|
zulip::sha256_tarball_to { 'golang':
|
||||||
url => "https://golang.org/dl/go${version}.linux-amd64.tar.gz",
|
url => "https://golang.org/dl/go${version}.linux-amd64.tar.gz",
|
||||||
sha256 => '550f9845451c0c94be679faf116291e7807a8d78b43149f9506c1b15eb89008c',
|
sha256 => '550f9845451c0c94be679faf116291e7807a8d78b43149f9506c1b15eb89008c',
|
||||||
install => {
|
install => {
|
||||||
'go/' => "/srv/golang-${version}/",
|
'go/' => $dir,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/srv/golang':
|
file { '/srv/golang':
|
||||||
ensure => 'link',
|
ensure => 'link',
|
||||||
target => "/srv/golang-${version}/",
|
target => $dir,
|
||||||
require => Zulip::Sha256_tarball_to['golang'],
|
require => Zulip::Sha256_tarball_to['golang'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class zulip::profile::smokescreen {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
exec { 'compile 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}/",
|
cwd => "/srv/smokescreen-src-${version}/",
|
||||||
# GOCACHE is required; nothing is written to GOPATH, but it is required to be set
|
# GOCACHE is required; nothing is written to GOPATH, but it is required to be set
|
||||||
environment => ['GOCACHE=/tmp/gocache', 'GOPATH=/root/go'],
|
environment => ['GOCACHE=/tmp/gocache', 'GOPATH=/root/go'],
|
||||||
|
|||||||
Reference in New Issue
Block a user