File tree Expand file tree Collapse file tree 4 files changed +8
-0
lines changed 
resources/puppetlabs/lein-ezbake 
template/global/ext/redhat 
test/unit/puppetlabs/ezbake Expand file tree Collapse file tree 4 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 11module EZBake
22  Config = { 
3+       :service_port   =>  {{{service-port}  }},
34      :project        => { {{project}  }},
45      :version        => { {{packaging-version}  }},
56      :release        => { {{packaging-release}  }},
Original file line number Diff line number Diff line change @@ -63,6 +63,10 @@ ExecStart=<%= EZBake::Config[:java_bin] %> $JAVA_ARGS -Dlogappender=F1 \
6363
6464KillMode=process
6565
66+ <%  if EZBake::Config[:service_port] -%> 
67+ # Wait until the service is started and opened the correct TCP port
68+ ExecStartPost=timeout 30s sh -c 'while ! ss -H -t -l -n sport = :<%=  EZBake::Config[:service_port] %>  | grep -q "^LISTEN.*:<%=  EZBake::Config[:service_port] %> "; do sleep 1s; done'
69+ <%  end -%> 
6670<%  EZBake::Config[:redhat][:post_start_action].each do |action| -%> 
6771ExecStartPost=-<%=  action %> 
6872<%  end -%> 
Original file line number Diff line number Diff line change 7171(def  LocalProjectVars 
7272  {(schema/optional-key  :user ) schema/Str
7373   (schema/optional-key  :numeric-uid-gid ) schema/Int
74+    (schema/optional-key  :service-port ) schema/Int
7475   (schema/optional-key  :group ) schema/Str
7576   (schema/optional-key  :puppet-platform-version ) schema/Int
7677   (schema/optional-key  :bootstrap-source ) BootstrapSource
@@ -608,6 +609,7 @@ Additional uberjar dependencies:
608609     :real-name                           (->  (:name  lein-project) get-real-name as-ruby-literal)
609610     :user                                (local->ruby  :user  (:name  lein-project))
610611     :numeric-uid-gid                     (local->ruby  :numeric-uid-gid  nil )
612+      :service-port                        (local->ruby  :service-port  nil )
611613     :group                               (local->ruby  :group  (:name  lein-project))
612614     :uberjar-name                        (as-ruby-literal  (:uberjar-name  lein-project))
613615     :config-files                        (as-ruby-literal  (map  remove-erb-extension config-files))
Original file line number Diff line number Diff line change 3232(deftest  trivial-make-template-map-behavior 
3333  (testing  " keyword bootstrap-source value with hyphens is ok" 
3434    (let  [expected {:numeric-uid-gid  " nil" 
35+                     :service-port  " nil" 
3536                    :debian-prerm  " []" 
3637                    :config-files  " []" 
3738                    :main-namespace  " 'puppetlabs.trapperkeeper.main'" 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments