mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 03:53:50 +00:00 
			
		
		
		
	puppet: Factor out sentry-cli installation.
This commit is contained in:
		
				
					committed by
					
						 Tim Abbott
						Tim Abbott
					
				
			
			
				
	
			
			
			
						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 { | ||||
|   include zulip::hooks::base | ||||
|   $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, | ||||
|   } | ||||
|   include zulip::sentry_cli | ||||
|  | ||||
|   zulip::hooks::file { [ | ||||
|     'common/sentry.sh', | ||||
|   | ||||
							
								
								
									
										23
									
								
								puppet/zulip/manifests/sentry_cli.pp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								puppet/zulip/manifests/sentry_cli.pp
									
									
									
									
									
										Normal file
									
								
							| @@ -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'], | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user