0.16.8 • Published 12 months ago

@sap-ux/deploy-tooling v0.16.8

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
12 months ago

@sap-ux/deploy-tooling

@sap-ux/deploy-tooling exposes the capabilities of custom tasks to deploy and undeploy SAP Fiori projects against ABAP servers.

Pre-requisites

  • SAP component SAP_UI 7.53 or higher is installed in your SAP system
  • Service needs to be enabled and accessible from your development environment, how to check this
  • For operations on a SAPUI5 ABAP repository, you need the S_DEVELOP authorization, how to check this

CLI

The module also exposes two commands deploy and undeploy.

Install

`npm install @sap-ux/deploy-tooling --save-dev`
# or
yarn add @sap-ux/deploy-tooling --dev

Verify local installation

npx deploy -h
# or
./node_modules/.bin/deploy -h

Usage

deploy [options]
# or
undeploy [options]

By default, YAML configuration is read from ui5-deploy.yaml, found in the root of your project when the deploy | undeploy commands are executed.

To change the default configuration location, run;

Deploy

deploy -c myproject/my-deploy-config.yaml
# or
deploy --config myproject/my-deploy-config.yaml

Undeploy

undeploy -c myproject/my-undeploy-config.yaml
# or
undeploy --config myproject/my-undeploy-config.yaml

Minimal Configuration

This is the minimal custom task configuration for deployment using package $TMP, without the change being recorded in a transport request.

- name: abap-deploy-task
  configuration:
    app:
      name: Z_TEST
      package: $TMP
    target:
      url: https://target.example
    exclude:
      - /test/

Configuration with logging enabled

Set the level of detail for log messages, default is Info;

Error = 0,
Warn = 1,
Info = 2,
Verbose = 3,
Debug = 4,
Silly = 5

Custom task YAML Configuration example:

- name: abap-deploy-task
  configuration:
    log: 5
    app:
      name: Z_TEST
      package: $TMP
    target:
      url: https://target.example
    exclude:
      - /test/

Or setting verbose: true will set the log level to Silly:

- name: abap-deploy-task
  configuration:
    verbose: true
    app:
      name: Z_TEST
      package: $TMP
    target:
      url: https://target.example
    exclude:
      - /test/

Deploy

The deploy command executes the same functionality as the abap-deploy UI5 task independent of the ui5 build execution. This allows to separate the build and the deployment process e.g. for CI/CD or to provide configurations as CLI args instead of having them defined in the ui5.yaml - nevertheless, the ui5.yaml is always required as a basis for the configuration.

Usage: deploy [options]

Options:
  -c, --config <path-to-yaml>          Path to config yaml file
  -y, --yes                            yes to all questions (default: false)
  -n, --no-retry                       do not retry if deploy fails for any reason, for CI/CD pipeline flows this option needs to be included (default: false)
  --verbose                            verbose log output (default: false)
  --destination  <destination>         Destination in SAP BTP pointing to an ABAP system
  --url <target-url>                   URL of target ABAP system
  --service                            (Optional) Alias for the target SAPUI5 Respository OData Service
  --client <sap-client>                Client number of target ABAP system
  --cloud                              target is an ABAP Cloud system
  --cloud-service-key <file-location>  JSON file location with the ABAP cloud service key.
  --cloud-service-env                  Load ABAP cloud service properties from either a .env file or your environment variables. Secrets in your .env should not be committed to source control.
  --username                           ABAP Service username
  --password                           ABAP Service password
  --authentication-type                Authentication type for the app (e.g. 'basic', 'reentranceTicket'). Required for 'reentranceTicket'.
  --create-transport                   Create a transport request during deployment/undeployment
  --transport <transport-request>      Transport number to record the change in the ABAP system
  --name <bsp-name>                    Project name of the app
  --no-strict-ssl                      Deactivate SSL certificate validation, enabled by default
  --test                               Run in test mode. ABAP backend reports deployment errors without actually deploying. (use --no-test to deactivate it)
  --package <abap-package>             Package name for deploy target ABAP system
  --description <description>          Project description of the app
  --safe                               Prevents accidentally breaking deployments.
  --keep                               Keep a copy of the deployed archive in the project folder.
  --archive-url <url>                  Download app bundle from this url and upload this bundle for deployment
  --archive-path <path>                Provide path of the app bundle for deployment
  --archive-folder <path>              Provide path to a folder for deployment
  -v, --version                        version of the deploy tooling
  -h, --help                           display help for command

Deploy Examples

Example 1 - Deploy to an ABAP Cloud system with strict SSL disabled

deploy --url <target-abap-system> --cloud true --name <app-name> --description '<app-description>' --package <package-name> --transport <transport-request> --no-strict-ssl

Using YAML configuration;

# yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json

specVersion: "3.1"
metadata:
  name: my.namespace.myappname
type: application
builder:
  resources:
    excludes:
      - /test/**
      - /localService/**
  customTasks:
    - name: abap-deploy-task
      afterTask: generateCachebusterInfo
      configuration:        
        target:
          url: <target-abap-system>
          cloud: true
        app:
          name: <app-name>
          description: <app-description>
          package: <package-name>
          transport: <transport-request>
        exclude:
          - /test/

Deploy CLI command;

deploy -c ui5-deploy.yaml --no-strict-ssl

Undeploy

The undeploy command allows undeploying a previously deployed application. This functionality is only available as CLI command and not as ui5 task.

Usage: undeploy [options]

Options:
  -c, --config <path-to-yaml>          Path to config yaml file
  -y, --yes                            yes to all questions (default: false)
  -n, --no-retry                       do not retry if undeploy fails for any reason, for CI/CD pipeline flows this option needs to be included (default: false)
  --verbose                            verbose log output (default: false)
  --destination  <destination>         Destination in SAP BTP pointing to an ABAP system
  --url <target-url>                   URL of target ABAP system
  --service                            (Optional) Alias for the target SAPUI5 Respository OData Service
  --client <sap-client>                Client number of target ABAP system
  --cloud                              target is an ABAP Cloud system
  --cloud-service-key <file-location>  JSON file location with the ABAP cloud service key.
  --cloud-service-env                  Load ABAP cloud service properties from either a .env file or your environment variables
  --username                           ABAP Service username
  --password                           ABAP Service password
  --authentication-type                Authentication type for the app (e.g. 'basic', 'reentranceTicket'). Required for 'reentranceTicket'.
  --transport <transport-request>      Transport number to record the change in the ABAP system
  --create-transport                   Create a transport request during deployment
  --package <abap-package>             Package name for deploy target ABAP system (only required when --create-transport is used)
  --name <bsp-name>                    Project name of the app
  --no-strict-ssl                      Deactivate SSL certificate validation, enabled by default
  --test                               Run in test mode. ABAP backend reports undeployment errors without actually undeploying (use --no-test to deactivate it).
  -v, --version                        version of the deploy tooling
  -h, --help                           display help for command

Proxy Support

To enable support for TLS (Transport Layer Security) connections when using HTTPS_PROXY, update your environment by setting the TOOLSUITE_FEATURES environment variable with sap.ux.enablePatchProxy, as shown;

export TOOLSUITE_FEATURES=sap.ux.enablePatchProxy
export HTTPS_PROXY=<YOUR-PROXY:PORT>

Example Scenario

If you're using a proxy server to route your HTTPS traffic, the proxy server will need to create a secure, TLS-encrypted connection to the target server on your behalf. tls.connect() will be used to establish that encrypted tunnel between your client, the proxy, and the server.

0.15.62

1 year ago

0.15.60

1 year ago

0.15.61

1 year ago

0.15.21

2 years ago

0.15.24

2 years ago

0.15.25

2 years ago

0.15.22

2 years ago

0.15.23

2 years ago

0.15.28

2 years ago

0.15.29

2 years ago

0.15.26

2 years ago

0.15.27

2 years ago

0.15.32

1 year ago

0.15.30

2 years ago

0.15.35

1 year ago

0.15.36

1 year ago

0.15.33

1 year ago

0.15.34

1 year ago

0.15.39

1 year ago

0.15.37

1 year ago

0.15.38

1 year ago

0.15.42

1 year ago

0.15.43

1 year ago

0.15.40

1 year ago

0.15.41

1 year ago

0.15.46

1 year ago

0.15.47

1 year ago

0.15.44

1 year ago

0.15.45

1 year ago

0.16.3

1 year ago

0.16.4

12 months ago

0.16.5

12 months ago

0.16.6

12 months ago

0.16.7

12 months ago

0.16.8

12 months ago

0.15.48

1 year ago

0.15.49

1 year ago

0.16.0

1 year ago

0.16.1

1 year ago

0.16.2

1 year ago

0.15.53

1 year ago

0.15.54

1 year ago

0.15.51

1 year ago

0.15.52

1 year ago

0.15.57

1 year ago

0.15.58

1 year ago

0.15.55

1 year ago

0.15.56

1 year ago

0.15.50

1 year ago

0.15.59

1 year ago

0.15.20

2 years ago

0.15.19

2 years ago

0.15.18

2 years ago

0.15.17

2 years ago

0.15.16

2 years ago

0.14.24

2 years ago

0.14.28

2 years ago

0.14.27

2 years ago

0.14.26

2 years ago

0.14.25

2 years ago

0.14.29

2 years ago

0.14.31

2 years ago

0.14.30

2 years ago

0.14.35

2 years ago

0.14.34

2 years ago

0.14.33

2 years ago

0.14.32

2 years ago

0.14.39

2 years ago

0.14.38

2 years ago

0.14.37

2 years ago

0.14.36

2 years ago

0.14.42

2 years ago

0.14.41

2 years ago

0.14.40

2 years ago

0.15.13

2 years ago

0.14.46

2 years ago

0.15.14

2 years ago

0.14.45

2 years ago

0.15.11

2 years ago

0.14.44

2 years ago

0.15.12

2 years ago

0.14.43

2 years ago

0.15.15

2 years ago

0.14.47

2 years ago

0.15.4

2 years ago

0.15.5

2 years ago

0.15.6

2 years ago

0.15.7

2 years ago

0.15.8

2 years ago

0.15.9

2 years ago

0.15.1

2 years ago

0.15.2

2 years ago

0.15.3

2 years ago

0.14.23

2 years ago

0.14.22

2 years ago

0.14.21

2 years ago

0.14.20

2 years ago

0.14.19

2 years ago

0.14.18

2 years ago

0.14.17

2 years ago

0.14.16

2 years ago

0.14.15

2 years ago

0.14.14

2 years ago

0.14.13

2 years ago

0.14.12

2 years ago

0.14.11

2 years ago

0.14.10

2 years ago

0.14.9

2 years ago

0.14.7

2 years ago

0.14.8

2 years ago

0.14.6

2 years ago

0.14.5

2 years ago

0.14.4

2 years ago

0.14.2

2 years ago

0.14.3

2 years ago

0.14.1

2 years ago

0.14.0

2 years ago

0.13.4

2 years ago

0.13.3

2 years ago

0.13.1

2 years ago

0.13.2

2 years ago

0.13.0

2 years ago

0.12.0

2 years ago

0.11.9

2 years ago

0.11.10

2 years ago

0.9.12

3 years ago

0.9.13

3 years ago

0.9.14

3 years ago

0.9.15

3 years ago

0.9.10

3 years ago

0.9.11

3 years ago

0.9.16

3 years ago

0.9.17

3 years ago

0.9.18

3 years ago

0.11.8

3 years ago

0.11.0

3 years ago

0.11.1

3 years ago

0.11.2

3 years ago

0.11.3

3 years ago

0.11.4

3 years ago

0.11.5

3 years ago

0.11.6

3 years ago

0.11.7

3 years ago

0.9.0

3 years ago

0.7.2

3 years ago

0.7.1

3 years ago

0.9.2

3 years ago

0.9.1

3 years ago

0.5.0

3 years ago

0.7.0

3 years ago

0.9.8

3 years ago

0.9.7

3 years ago

0.9.9

3 years ago

0.9.4

3 years ago

0.9.3

3 years ago

0.9.6

3 years ago

0.9.5

3 years ago

0.10.1

3 years ago

0.10.2

3 years ago

0.9.20

3 years ago

0.10.0

3 years ago

0.4.5

3 years ago

0.8.0

3 years ago

0.4.4

3 years ago

0.4.1

3 years ago

0.4.3

3 years ago

0.6.0

3 years ago

0.4.2

3 years ago

0.4.0

3 years ago

0.3.4

3 years ago

0.3.2

3 years ago

0.3.3

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.10

3 years ago

0.3.0

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.3.1

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago