Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adding mc-app example to application kit #70

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
50 changes: 37 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,25 +118,49 @@ deployAs:
scripts:
postDeploy: npm install && npm run build && npm run connector:post-deploy
preUndeploy: npm install && npm run build && npm run connector:pre-undeploy
configurationType:
ENVIRONMENT_VARIABLE_1: standard
ENVIRONMENT_VARIABLE_2: secret
ENVIRONMENT_VARIABLE_3: secret
configuration:
standardConfiguration:
- key: ENVIRONMENT_VARIABLE_1
description: description variable 1
securedConfiguration:
- key: ENVIRONMENT_VARIABLE_2
description: description variable 2
- key: ENVIRONMENT_VARIABLE_3
description: description variable 3
- name: app2
applicationType: job
endpoint: /app2
properties:
schedule: "*/5 * * * *"
configurationType:
ENVIRONMENT_VARIABLE_1: standard
ENVIRONMENT_VARIABLE_2: standard
configuration:
standardConfiguration:
- key: ENVIRONMENT_VARIABLE_1
description: description variable 1
- key: ENVIRONMENT_VARIABLE_2
description: description variable 2
- name: app3
applicationType: event
endpoint: /app3
configurationType:
ENVIRONMENT_VARIABLE_1: standard
ENVIRONMENT_VARIABLE_2: secret
ENVIRONMENT_VARIABLE_3: standard
configuration:
securedConfiguration:
- key: ENVIRONMENT_VARIABLE_1
description: description variable 1
- key: ENVIRONMENT_VARIABLE_2
description: description variable 2
- key: ENVIRONMENT_VARIABLE_3
description: description variable 3
- name: app4
applicationType: mc-app
endpoint: /app4
configuration:
standardConfiguration:
- key: ENVIRONMENT_VARIABLE_1
description: description variable 1
securedConfiguration:
- key: ENVIRONMENT_VARIABLE_2
description: description variable 2
- key: ENVIRONMENT_VARIABLE_3
description: description variable 3
```

- Multiple applications of same type can be setup
Expand All @@ -145,9 +169,9 @@ deployAs:

## Property definition
- `name` - Folder name of respective application component from the root of monorepo which will be used as identifier of the application. Deployment output url, topic & schedule can be fetched based on this reference
- `applicationType` - Type of deployment . Can be one of `service`, `event` or `job`
- `applicationType` - Type of deployment . Can be one of `service`, `event`, `job` and `mc-app`
- `endpoint` - Point of entry for respective application component
- `scripts.postDeploy` - Post-deploy script to execute after the connector deployment process
- `scripts.preUndeploy` - Pre-undeploy script to execute before the connector undeployment process
- `configurationType` - Definiton of all environment variables needed by the application, customer will be responsible to provide value for these variables when choosen to deploy. Definition includes defining the type of variable if it needs to be secured or not . `standard` for customer provided values to be saved as plain text , `secret` for customer provided values to be secured and stored in encrypted format
- `configuration` - Definiton of all environment variables needed by the application, customer will be responsible to provide value for these variables when choosen to deploy. You need to choose between `standardConfiguration` and `securedConfiguration`. `standardConfiguration` for customer provided values to be saved as plain text , `securedConfiguration` for customer provided values to be secured and stored in encrypted format
- `schedule` - Schedule expression for job applications, it need to be input of type <a href="https://en.wikipedia.org/wiki/Cron">cron</a> expression
13 changes: 12 additions & 1 deletion application-templates/javascript/connect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,15 @@ deployAs:
- key: CTP_CLIENT_SECRET
description: commercetools Composable Commerce client secret
- key: CTP_SCOPE
description: commercetools Composable Commerce client scope
description: commercetools Composable Commerce client scope
- name: mc-app
applicationType: mc-app
endpoint: /
configuration:
standardConfiguration:
- key: APPLICATION_ID
dario-commercetools marked this conversation as resolved.
Show resolved Hide resolved
description: commercetools Composable Commerce application ID
required: true
- key: CLOUD_IDENTIFIER
dario-commercetools marked this conversation as resolved.
Show resolved Hide resolved
description: commercetools Composable Commerce cloud identifier
required: true
2 changes: 1 addition & 1 deletion application-templates/javascript/docs/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This connector has sample `service` , `event` & `job` applications
This connector has sample `service` , `event`, `job` & `mc-app` applications
3 changes: 3 additions & 0 deletions application-templates/javascript/mc-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To create Custom Application for the Merchant Center you can visit [getting starter documentation](https://docs.commercetools.com/custom-applications/getting-started).

The easiest way to get started is to use Merchant Center's [starter template](https://docs.commercetools.com/custom-applications/getting-started#installing-a-starter-template). The app should live inside this folder and it should be the Custom Application's root folder.
13 changes: 12 additions & 1 deletion application-templates/typescript/connect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,15 @@ deployAs:
- key: CTP_CLIENT_SECRET
description: commercetools Composable Commerce client secret
- key: CTP_SCOPE
description: commercetools Composable Commerce client scope
description: commercetools Composable Commerce client scope
- name: mc-app
applicationType: mc-app
endpoint: /
configuration:
standardConfiguration:
dario-commercetools marked this conversation as resolved.
Show resolved Hide resolved
- key: APPLICATION_ID
description: commercetools Composable Commerce application ID
required: true
- key: CLOUD_IDENTIFIER
dario-commercetools marked this conversation as resolved.
Show resolved Hide resolved
description: commercetools Composable Commerce cloud identifier
required: true
2 changes: 1 addition & 1 deletion application-templates/typescript/docs/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This connector has sample `service` , `event` & `job` applications
This connector has sample `service` , `event`, `job` & `mc-app` applications
3 changes: 3 additions & 0 deletions application-templates/typescript/mc-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To create Custom Application for the Merchant Center you can visit [getting starter documentation](https://docs.commercetools.com/custom-applications/getting-started).

The easiest way to get started is to use Merchant Center's [starter template](https://docs.commercetools.com/custom-applications/getting-started#installing-a-starter-template). The app should live inside this folder and it should be the Custom Application's root folder.
Loading