Skip to content

Commit

Permalink
use another name, key and context path in order to deploy also micros…
Browse files Browse the repository at this point in the history
…ervice hosted (#6)

Co-authored-by: Pester <apes@softwareag.com>
  • Loading branch information
PestusAtSAG and PestusAtSAG authored Aug 23, 2022
1 parent b033e57 commit 5386e8d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/resources/META-INF/archetype-post-generate.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def jsonSlurper = new JsonSlurper()
// Step 1.1: Create application on Cumulocity Tenant
def post1 = new URL("$devC8yBaseURL/application/applications").openConnection();
def message1 = """{
"key": "$microserviceName",
"name": "$microserviceName",
"contextPath": "$microserviceName",
"key": "$microserviceName-dev",
"name": "$microserviceName-dev",
"contextPath": "$microserviceName-dev",
"type": "MICROSERVICE",
"manifest":{},
"requiredRoles": [
Expand Down Expand Up @@ -90,6 +90,8 @@ if(!getRC3.equals(200)) {
}
println("3. Microservice credentials successfuly acquired for application $msInternalId")


//Step 1.4: write properties file for dev profile
def responseBody3 = get3.getInputStream().getText()
def object3 = jsonSlurper.parseText(responseBody3)

Expand All @@ -103,8 +105,8 @@ c8y.version=@c8y.version@
microservice.version=@project.version@
#Cumulocity configuration for running localy and connecting to cumulocity
application.name=$microserviceName
application.key=$microserviceName
application.name=$microserviceName-dev
application.key=$microserviceName-dev
C8Y.bootstrap.register=true
C8Y.bootstrap.tenant=$devC8yTenantId
C8Y.baseURL=$devC8yBaseURL
Expand Down

0 comments on commit 5386e8d

Please sign in to comment.