天天看点

SAP Commerce Cloud Build Manifest Components

SAP Commerce Cloud Build Manifest Components

例子:

{
    "commerceSuiteVersion": "2011",
    "extensions": [
        "modeltacceleratorservices",
        "electronicsstore",
        "yacceleratorstorefront",
        "backoffice"
    ],      
SAP Commerce Cloud Build Manifest Components
{
    "commerceSuiteVersion" : "2011",
    "extensionPacks" : [
    {
        "name" : "media-telco",
        "version" : "a.b.c.d"
    }
    ],
    "extensions": [
    "customerstorefront"
    ]
}      
SAP Commerce Cloud Build Manifest Components

extension packs 会下载额外的软件 artifacts.

In the extension-packs section, define which artifacts should be downloaded. List all specific extensions required for the build in the extensions section.

Extensions

SAP Commerce Cloud Build Manifest Components

Your code or Git repository.

SAP Commerce Cloud (as defined by the application version).

MT Module, which provides the SAP internal extensions that were developed to run on SAP Commerce Cloud in the public cloud.

Extensions packs.

SAP Commerce Cloud Build Manifest Components
SAP Commerce Cloud Build Manifest Components

webapps 属性标识了对该 aspect 可用的 web 应用,以及 contextPath,即访问该 web 应用应该使用的路径。

构建流程自动配置下列五个 aspects:

accstorefront: Configures the storefront

backoffice: Configures Backoffice

backgroundProcessing: Executes tasks in the background

admin: Performs ant administration tasks, such as initialization and updatesystem

api: Modifies webservices for increased security and to support different configurations. If there’s no webapps aspect in manifest.json, then only default webapps are included (mediaweb, hac and oauth2).

"aspects": [
        {
            "name": "backoffice",
            "properties": [
                {
                    "key": "test.property.1",
                    "value": "test.property-1-value-prod-backoffice",
                    "persona": "production"
                },
                {
                    "key": "test.property.2",
                    "value": "test.property-2-value-backoffice"
                }
            ],
            "webapps": [
                {
                    "name": "hac",
                    "contextPath": "/hac"
                },
                {
                    "name": "mediaweb",
                    "contextPath": "/medias"
                },
                {
                    "name": "backoffice",
                    "contextPath": ""
                }
            ]
        },
        {
            "name": "accstorefront",
            "properties": [
                {
                    "key": "spring.session.enabled",
                    "value": "true"
                },
                {
                    "key": "spring.session.yacceleratorstorefront.save",
                    "value":"async"
                },
                {
                    "key": "spring.session.yacceleratorstorefront.cookie.name",
                    "value": "JSESSIONID"
                },
                {
                    "key": "spring.session.yacceleratorstorefront.cookie.path",
                    "value": "/"
                },
                {
                    "key":"storefrontContextRoot",
                    "value":""
                }
            ],
            "webapps": [
                {
                    "name": "mediaweb",
                    "contextPath": "/medias"
                },
                {
                    "name": "mycustomstorefront",
                    "contextPath": ""
                },
                {
                    "name": "acceleratorservices",
                    "contextPath": "/acceleratorservices"
                }
            ]
        },
        {
            "name": "backgroundProcessing",
            "properties": [],
            "webapps": [
                {
                    "name": "hac",
                    "contextPath": ""
                },
                {
                    "name": "mediaweb",
                    "contextPath": "/medias"
                } 
           ]
        },
        {
            "name": "api",
            "properties": [
                    {
                        "key":"xss.filter.header.X-Frame-Options",
                        "value":""
                    }
            ],
            "webapps": [
                {
                    "name": "ycommercewebservices",
                    "contextPath": "/rest"
                },
                {
                    "name": "oauth2",
                    "contextPath": "/authorizationserver"
                },
                {
                    "name": "cmswebservices",
                    "contextPath": "/cmswebservices"
                },
                {
                    "name": "permissionswebservices",
                    "contextPath": "/permissionswebservices"
                }
            ]
        }
    ],      
SAP Commerce Cloud Build Manifest Components
SAP Commerce Cloud Build Manifest Components

在 local.properties 里定义 properties.

每个 Properties 可以定义四个 属性(attributes):

key: Defines the property key. This attribute is required.

value: Defines the property value. This attribute is required.

persona: Sets a given property for a specific environment type (development, staging, and production).

secret: Indicates a property value that is secret, for example, a password. Values set to secret are excluded from build logs.

],
    "properties": [
        {
            "key": "test.property.1",
            "value": "test.property.1.value",
            "persona": "production"
        },
        {
            "key": "test.property.2",
            "value": "test.property.2.value",
            "persona": "development"
        },
        {
            "key": "test.property.2",
            "value": "test.property.2.value.in.prod.only",
            "persona": "production"
        }
    ],      

下列两个 Properties 对提高 SAP Commerce Cloud 数据库性能有所帮助:

},
        {
            "key": "auditing.enabled",
            "value": "false"
        },
        {
            "key": "default.session.timeout",
            "value": "360",
        },
              

auditing.enabled=false prevents the auditing of changes to items within SAP Commerce Cloud. For more information, see Generic Audit.

default.session.timeout=360 limits the storage time for a session in the database to 360 seconds. For more information, see Jalo Session.

在 Commerce Cloud build 阶段,下列这些 Properties 会被填充上默认值。

SAP Commerce Cloud Build Manifest Components
SAP Commerce Cloud Build Manifest Components