Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
puppet: Factor out golang variables.
Alex Vandiver93af6c7f0678
diff --git a/puppet/zulip/manifests/golang.pp b/puppet/zulip/manifests/golang.ppindex 249c0e4b22e..3832fc8d643 100644--- a/puppet/zulip/manifests/golang.pp+++ b/puppet/zulip/manifests/golang.pp@@ -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'],}}diff --git a/puppet/zulip/manifests/profile/smokescreen.pp b/puppet/zulip/manifests/profile/smokescreen.ppindex 407242e76a7..fc05794f8f8 100644--- a/puppet/zulip/manifests/profile/smokescreen.pp+++ b/puppet/zulip/manifests/profile/smokescreen.pp@@ -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 setenvironment => ['GOCACHE=/tmp/gocache', 'GOPATH=/root/go'],