Skip to content

Commit

Permalink
fix dummy catalog for the cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
alperdedeoglu committed Oct 7, 2024
1 parent 496ef4b commit 9e6b646
Showing 1 changed file with 26 additions and 16 deletions.
42 changes: 26 additions & 16 deletions code/broker/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,32 @@ import Broker from '@sap/sbf';
// If this is a CI CD deployment we get broker credentials from env and hardcode the catalog.
if (process.env.cicd) {
const catalog = `{
"services": [
{
"name": "susaas-api",
"description": "Sustainable SaaS API",
"bindable": true,
"plans": [
{
"name": "default",
"description": "Standard Plan",
"id": "57030d69-3e2d-4dd9-a138-21f16b542dff"
}
],
"id": "6dec18a5-4742-450f-8840-ef9df0331b20"
}
]
}`
"services": [
{
"name": "susaas-api",
"description": "Sustainable SaaS API",
"bindable": true,
"plans": [
{
"name": "trial",
"description": "Trial Plan",
"id": "8f7c2dce-7500-4115-9df5-aebb9060e83d"
},
{
"name": "default",
"description": "Standard Plan",
"id": "d1d6bcc4-5f75-43cb-a537-3fddbff00f11"
},
{
"name": "premium",
"description": "Premium Plan",
"id": "2e12d1f4-d871-443c-8824-6f33d2748a1b"
}
],
"id": "ba609874-a1da-4f9c-a22b-f61de0c71a9e"
}
]
}`
let brokerConfig = { brokerCredentials: { [process.env["BROKER_USER"]]: process.env["BROKER_PASSWORD"] }, catalog: JSON.parse(catalog) }
new Broker(brokerConfig).start()
}
Expand Down

0 comments on commit 9e6b646

Please sign in to comment.