0.10.27 • Published 3 years ago

@sap/abap-deploy v0.10.27

Weekly downloads
30
License
SEE LICENSE IN LI...
Repository
-
Last release
3 years ago

abap-deploy

Installation

npm install @sap/abap-deploy

Simple Usage

  • execute abap-deploy in your terminal and answer the questions in the terminal.
  • or abap-deploy --help to explore the CLI Options.

Running CLI on local environment

Prerequisite:

In order to run the abap-deploy CLI on your local environment, you need to add SAP Global Root CA Certificate to your trusted certificate list. This can be achieved by navigating to your SAP System using your browser (e.g. https://<host>:<port>/sap/bc/adt/discovery), exporting the certificate from your browser, and then adding it to NODE_EXTRA_CA_CERTS You can find more details in here: https://help.sap.com/viewer/a9f57505bbb34a6da3c5ba3a49d409d8/Latest/en-US/4b318bede7eb4021a8be385c46c74045.html

  • Add: "@sap/abap-deploy": "<version>" to devDependencies section of your project's package.json
  • Execute npm install
  • Execute npm run build
  • Execute abap-deploy in your terminal and answer the questions in the terminal.

Note: When requested to provide Target System url make sure you are using https and not http.

In Depth Guide

Interactive mode

By default the abap-deploy tool will ask the user for any missing configuration.

CLI Arguments

Configuration options may be passed as command line arguments, e.g: abap-deploy --targetSystem=https://foo.com --client=010

The list of CLI options can be printed by running abap-deploy --help

CLI arguments may be useful to avoid re-typing the same values or to inject values from environment variables for certain options.

Configuration files

Any configuration options that can be set via the command line can also be specified within a separate configuration file. A variety of default config files flavors are available:

File nameFile Association
.abap-deployrcJSON or YAML
.abap-deployrc.jsonJSON
.abap-deployrc.yamlYAML
.abap-deployrc.ymlYAML
.abap-deployrc.jsCommonJS export
abap-deploy.config.jsCommonJS export

These default configuration files will be searched "upwards" starting from the CWD.

Custom Name Configuration Files.

A specific configuration file path may be provided using the configPath option, e.g:

  • abap-deploy --config-path=./my-custom.config.json

Multiple custom name configuration files may be useful to manage presets of deployment scenarios, e.g test vs productive systems.

package.json configuration

The configuration can also be embedded in the project's package.json inside the "abap-deploy" key, e.g:

  • {
      "name": "myApp",
      "version": "0.2.0",
      "dependencies": {},
      "devDependencies": {},
      "abap-deploy": {}
    }

Sample JSON Configuration File

{
  "deploy": {
    "sourceFolder": "./dist",
    "targetSystem": "http://abc.com",
    "client": "010",
    "username": "Tom",
    "password": "abcd1234",
    "appName": "foo"
  },
  "cli": {
    "interactiveFallBack": false
  }
}

Sample YAML Configuration File

deploy:
  sourceFolder: "./dist"
  targetSystem: http://abc.com
  client: "010"
  username: Tom
  password: abcd1234
  appName: foo
cli:
  interactiveFallBack: false

Combining Interactive / CLI / Config Files

Options from different sources have different precedence levels.

  • CLI arguments (e.g --source-folder) options have the highest priority and will override any other options.
  • Configuration files options are next on the priority list.
  • Interactive options are the lowest priority and will only be asked for options which have no values assigned by either CLI/Config FIle.

Options Reference

sourceFolder

DescriptionProject's Pre-Built Artifacts Folder to Deploy
TypeString
CLI Name--source-folder
CLI Alias--sf
Config File Keydeploy.sourceFolder
Default./dist (if exists)

targetSystem

DescriptionABAP system URL to Deploy to
TypeString
CLI Name--target-system
CLI Alias--ts
Config File Keydeploy.targetSystem

client

DescriptionABAP system client number
TypeString
CLI Name--client
CLI Alias--c
Config File Keydeploy.client

username

DescriptionABAP System username
TypeString
CLI Name--username
CLI Alias--u
Config File Keydeploy.username

password

DescriptionABAP System password
TypeString
CLI Name--password
CLI Alias--p
Config File Keydeploy.password

appName

DescriptionApplication Name (folder in BSP)
TypeString
CLI Name--app-name
CLI Alias--ap
Config File Keydeploy.appName

description

DescriptionApplication Description
TypeString
CLI Name--description
CLI Alias--d
Config File Keydeploy.description

interactiveFallBack

DescriptionFallback to Interactive mode in case of missing arguments
TypeBoolean
CLI Name--interactive-fallback
CLI Alias--if
Config File Keycli.interactiveFallBack
Defaulttrue

configPath

DescriptionRelative Path to Configuration file
TypeBoolean
CLI Name--config-path
CLI Alias--cf
Config File Keycli.configPath
DefaultSee "Configuration Files" section

logLevel

DescriptionThe level of logs to report for notification purposes. Any logs of a higher level than the logLevel setting will be written to the abap-deploy.log file in the current working directory.
Type"off" or "fatal" or "error" or "warn" or "info" or "debug" or "trace"
CLI Name--log-level
CLI Alias--ll
Config File Keycli.logLevel
Default"off"

Support channel

For reporting an issue, open a BCP ticket with component CA-BAS-DPL-ABAP For reporting a feature request, please open an influence request (https://influence.sap.com/sap/ino/#campaign/2538)