service: $SERVICE_ID is the long service id

master
Luka Vandervelden 2019-10-24 15:29:22 +02:00
parent 035420cc9a
commit 440fde06f8
1 changed files with 6 additions and 2 deletions

View File

@ -76,11 +76,15 @@ class Service
file.join("\n") + "\n"
end
def full_id
"#{@environment.name}/#{name}"
end
def id
if @environment.name == "root"
name
else
"#{@environment.name}/#{name}"
full_id
end
end
@ -113,7 +117,7 @@ class Service
private def build_environment
env = {} of String => String
env["SERVICE_ID"] = id
env["SERVICE_ID"] = full_id
env["ENVIRONMENT"] = @environment.name
env["ENVIRONMENT_TYPE"] = @environment.type.to_s