Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module EZBake
Config = {
:service_port => {{{service-port}}},
:project => {{{project}}},
:version => {{{packaging-version}}},
:release => {{{packaging-release}}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ ExecStart=<%= EZBake::Config[:java_bin] %> $JAVA_ARGS -Dlogappender=F1 \

KillMode=process

<% if EZBake::Config[:service_port] -%>
# Wait until the service is started and opened the correct TCP port
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'
<% end -%>
<% EZBake::Config[:redhat][:post_start_action].each do |action| -%>
ExecStartPost=-<%= action %>
<% end -%>
Expand Down
2 changes: 2 additions & 0 deletions src/puppetlabs/ezbake/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
(def LocalProjectVars
{(schema/optional-key :user) schema/Str
(schema/optional-key :numeric-uid-gid) schema/Int
(schema/optional-key :service-port) schema/Int
(schema/optional-key :group) schema/Str
(schema/optional-key :puppet-platform-version) schema/Int
(schema/optional-key :bootstrap-source) BootstrapSource
Expand Down Expand Up @@ -608,6 +609,7 @@ Additional uberjar dependencies:
:real-name (-> (:name lein-project) get-real-name as-ruby-literal)
:user (local->ruby :user (:name lein-project))
:numeric-uid-gid (local->ruby :numeric-uid-gid nil)
:service-port (local->ruby :service-port nil)
:group (local->ruby :group (:name lein-project))
:uberjar-name (as-ruby-literal (:uberjar-name lein-project))
:config-files (as-ruby-literal (map remove-erb-extension config-files))
Expand Down
1 change: 1 addition & 0 deletions test/unit/puppetlabs/ezbake/core_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
(deftest trivial-make-template-map-behavior
(testing "keyword bootstrap-source value with hyphens is ok"
(let [expected {:numeric-uid-gid "nil"
:service-port "nil"
:debian-prerm "[]"
:config-files "[]"
:main-namespace "'puppetlabs.trapperkeeper.main'"
Expand Down