mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	puppet: Switch smokescreen to using zulip::external_dep, so it tidies.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							ea08111d60
						
					
				
				
					commit
					3a7cef6582
				
			@@ -6,20 +6,22 @@ class zulip::profile::smokescreen {
 | 
			
		||||
  include zulip::golang
 | 
			
		||||
 | 
			
		||||
  $version = 'dc403015f563eadc556a61870c6ad327688abe88'
 | 
			
		||||
  zulip::sha256_tarball_to { 'smokescreen':
 | 
			
		||||
    url     => "https://github.com/stripe/smokescreen/archive/${version}.tar.gz",
 | 
			
		||||
    sha256  => 'ad4b181d14adcd9425045152b903a343dbbcfcad3c1e7625d2c65d1d50e1959d',
 | 
			
		||||
    install => {
 | 
			
		||||
      "smokescreen-${version}/" => "/srv/zulip-smokescreen-src-${version}/",
 | 
			
		||||
    },
 | 
			
		||||
  $dir = "/srv/zulip-smokescreen-src-${version}/"
 | 
			
		||||
 | 
			
		||||
  zulip::external_dep { 'smokescreen-src':
 | 
			
		||||
    version        => $version,
 | 
			
		||||
    url            => "https://github.com/stripe/smokescreen/archive/${version}.tar.gz",
 | 
			
		||||
    sha256         => 'ad4b181d14adcd9425045152b903a343dbbcfcad3c1e7625d2c65d1d50e1959d',
 | 
			
		||||
    tarball_prefix => "smokescreen-${version}/",
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  exec { 'compile smokescreen':
 | 
			
		||||
    command     => "${zulip::golang::bin} build -o /usr/local/bin/smokescreen-${version}",
 | 
			
		||||
    cwd         => "/srv/zulip-smokescreen-src-${version}/",
 | 
			
		||||
    cwd         => $dir,
 | 
			
		||||
    # GOCACHE is required; nothing is written to GOPATH, but it is required to be set
 | 
			
		||||
    environment => ['GOCACHE=/tmp/gocache', 'GOPATH=/root/go'],
 | 
			
		||||
    creates     => "/usr/local/bin/smokescreen-${version}",
 | 
			
		||||
    require     => [File[$zulip::golang::bin], Zulip::Sha256_tarball_to['smokescreen']],
 | 
			
		||||
    require     => [File[$zulip::golang::bin], File[$dir]],
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  file { '/usr/local/bin/smokescreen':
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user