Code Pipeline CLI (IspwCLI.bat)


The Code Pipeline CLI (IspwCLI.bat) is a command-line interface used to automate interactions with BMC AMI DevX Code Pipeline from developer workflows and CI/CD pipelines. The CLI enables non-interactive execution of Code Pipeline operations, allowing integration with automation tools such as Jenkins, Azure DevOps, and other CI/CD platforms.

The Code Pipeline CLI is used to:

  • Synchronize changes from a Git repository into a Code Pipeline container.
  • Load components into Code Pipeline using repository path/type mappings.
  • Generate previously loaded components.
  • Build components according to Code Pipeline rules.
  • Download components from Code Pipeline containers to a local workspace

Executables

Depending on the installation package and operating system, the following executables are available:

ExecutableDescription
IspwCLI.batExecutes Code Pipeline operations
SCMDownloaderCLI.batDownloads components from Code Pipeline

Prerequisites

The following prerequisites must be met before using the Code Pipeline CLI (IspwCLI.bat):

CategoryRequirement
System and network requirements
  • Network connectivity is available between the client system and the Code Pipeline server.
  • Required ports are open and accessible (firewall and VPN configuration as applicable).
  • The Code Pipeline server host name or IP address and port number are known.
Authentication requirements

A valid Code Pipeline user ID and password are available, or Certificate-based authentication is configured using one of the following:

  • Keystore and certificate alias
  • Base-64 encoded certificate string
Environment configuration
  • The correct host code page is specified for the connection (commonly 1047).
  • An appropriate encryption protocol is selected when using secure connections.
  • Required environment variables and paths are configured to execute the CLI batch files.
Git requirements (for synchronization operations)
  • Access to the Git repository is available.
  • Git credentials are configured when required.
  • The repository URL, branch name, and commit hash or file list are known.
  • A local workspace directory is available for Git operations.
Configuration file requirements (for load, generate, and build operations)
  • A valid ispwconfig.yml file is available.
  • The YAML file contains correct:

    • Code Pipeline connection details
    • Application, stream, and runtime configuration
    • Path and component type mappings
  • The ispwconfig.yml file is accessible from the execution environment.
Permissions
  • The Code Pipeline user has sufficient permissions to:

    • Create and update containers
    • Load components
    • Generate components
    • Build components
  • Required access is granted for the specified application, stream, and levels.

Command structure

Code Pipeline CLI commands use a consistent structure that includes connection details, Code Pipeline context information, and an operation with its associated parameters.

IspwCLI.bat \
  -host <host> -port <port> \
  -id <user> -pass <password> \
  -code <codepage> -timeout <minutes> \
  -ispwServerConfig <runtimeConfig> \
  -ispwServerStream <stream> \
  -ispwServerApp <application> \
  -ispwCheckoutLevel <level> \
  -operation <operationName> \
  [operation-specific parameters]

Each command specifies a single operation. Additional parameters are required or optional depending on the operation being executed.

Operations

The Code Pipeline CLI supports the following operations:

  • syncGitToIspw: Synchronize content from a Git repository into Code Pipeline
  • load: Load components into Code Pipeline using path mappings
  • generate: Generate previously loaded components
  • build: Build generated components

Each operation is described in the following sections, including required parameters, optional parameters, and the resulting behavior.

Synchronize Git content into Code Pipeline

The syncGitToIspw operation is used to synchronize files or commits from a Git repository into Code Pipeline containers. For example:

IspwCLI.bat \
  -host cw09.bmc.com -port 47624 \
  -id pinmxj0 -pass ****** \
  -code 1047 -timeout 0 \
  -ispwServerConfig TPTP \
  -gitRepoUrl https://bitbucket.zeng.bmc.com/scm/~jarora/rjk2.git \
  -gitUsername johnxyz -gitPassword ****** \
  -gitBranch master \
  -gitCommit COB/TPROG01.cbl \
  -gitFromHash -1 \
  -ispwServerStream PLAY \
  -ispwServerApp PLAY \
  -ispwServerSubAppl PLAY \
  -ispwCheckoutLevel DEV1 \
  -ispwContainerCreation per-commit \
  -gitLocalPath rjk2 \
  -targetFolder rjk2 \
  -operation syncGitToIspw
  -ispwConfigPath ispwconfig.yml

Required parameters

ParameterDescription
-operation syncGitToIspwSpecifies the synchronization operation
-gitRepoUrlGit repository URL
-gitBranchGit branch name
-gitCommitCommit hash or colon-delimited list of file paths
-ispwServerConfigCode Pipeline runtime configuration
-ispwServerStreamCode Pipeline stream name
-ispwServerAppCode Pipeline application name
-ispwCheckoutLevelLevel to check components out to
-ispwConfigPathPath to the ispwconfig.yml file

Optional parameters

ParameterDescription
-gitFromHashStarting commit hash for incremental or multibranch synchronization
-gitLocalPathLocal Git repository path
-ispwServerSubApplCode Pipeline sub-application
-ispwContainerCreationContainer creation mode (for example, per-commit). The per-commit and per-branch modes in ISPW CLI define the frequency at which new containers (assignments or tasks) are generated during Git-to-Code Pipeline synchronization or load operations.
-targetFolderLocal folder for synchronized content

The following are the execution outcome:

  • Files or commits from the Git repository are synchronized into a Code Pipeline container.
  • A container is created based on the specified container creation mode.
  • The container is associated with the specified application, stream, and level.

How syncGitToIspw works

The syncGitToIspw operation synchronizes source files stored in a Git repository with components managed in Code Pipeline. The CLI retrieves the specified files or commits from Git and uploads them to Code Pipeline according to the configuration defined in ispwconfig.yml.
​Git Repository

│ (gitFromHash + gitCommit determine the sync range)

Topaz CLI (syncGitToIspw)

│ Uses configuration from ispwconfig.yml

ISPW Server


Updated ISPW Components​

Example: syncGitToIspw command with Git parameters

The following example demonstrates how the syncGitToIspw operation can be used in a Jenkins pipeline to synchronize files from a Git repository to Code Pipeline. This example illustrates how the gitCommit and gitFromHash parameters interact when determining which files are synchronized.

C:/WorkbenchCLI253/IspwCLI.bat -operation syncGitToIspw
-host "cw09" -port "47624" -id "PINMXJ1" -pass ********
-protocol None -code 1047 -timeout "0"
-targetFolder C:\ProgramData\Jenkins.jenkins\workspace\sync_git_master
-data C:\ProgramData\Jenkins.jenkins\workspace\sync_git_master\TopazCliWkspc
-ispwServerConfig TPTP -ispwServerStream PLAY -ispwServerApp PLAY
-ispwServerSubAppl PLAY -ispwCheckoutLevel DEV1
-ispwConfigPath ispwconfig.yml -ispwContainerCreation per-commit
-gitUsername "username" -gitPassword ********
-gitRepoUrl "https://github.bmc.com/ISPW-Eclipse/rjk2.git
-gitBranch master -gitFromHash -1
-gitLocalPath C:\ProgramData\Jenkins.jenkins\workspace\sync_git_master
-gitCommit "Jenkinsfile:ASM/CLASMS10.asm:ASM/CLASMS09.asm:ASM/CLASMM09.asm:ispwconfig.yml:ASM/TRIMAINA.asm"

The following table describes the parameters used in this example:

ParameterDescription
-targetFolder-targetFolder C:\ProgramData\Jenkins.jenkins\workspace\sync_git_master

 

  • Defines the root working directory where the CLI stores operation outputs. 
  • The CLI creates folders and files in this location. Relative paths automatically append to it.

Example:
If the following parameters are used:

-targetFolder C:\ProgramData\Jenkins.jenkins\workspace\sync_git_master
-ispwConfigPath ispwconfig.yml

The CLI resolves the configuration file as:

C:\ProgramData\Jenkins.jenkins\workspace\sync_git_master\ispwconfig.yml

Single workspace contains Git repository, configuration files, and temporary operation files

-gitLocalPath-gitLocalPath C:\ProgramData\Jenkins.jenkins\workspace\sync_git_master
  • Defines the local filesystem location where the Git repository is stored.
  • In this example, the value matches the targetFolder, meaning the Git clone/checkout happens within the same workspace.

Example:

sync_git_master/
├── .git/ (Git metadata)
├── ASM/
│ ├── CLASMS10.asm (Mainframe sources)
│ ├── CLASMS09.asm
│ ├── CLASMM09.asm
│ ├── TRIMAINA.asm
│ ├── CLASMM01.asm
│ ├── CLASMM06.asm
│ ├── CLASMM07.asm
│ ├── CLASMM05.asm
│ └── CLASMM02.asm
├── Jenkinsfile
└── ispwconfig.yml (ASM to ISPW path mappings)
-gitFromHash-gitFromHash -1
  • Defines the starting point of the synchronization range. 
  • The value -1 indicates synchronization from the beginning of the branch history  (all commits from root).
  • This option is commonly used in multibranch pipelines when a complete baseline synchronization is required.
  • Alternatively, you can specify a commit hash (for example, abc123def) to perform a partial or incremental synchronization between two commits.
-gitCommit-gitCommit "Jenkinsfile:ASM/CLASMS10.asm:ASM/CLASMS09.asm"

This parameter accepts either:

  • Option 1 – File list
    Colon-delimited list of changed files (as shown in example). Syncs only these specific files from the commit
  • Option 2 – Commit hash
    Git commit SHA (long or short form). Providing a commit hash synchronizes all changes up to that hash from gitFromHash

Relationship between gitFromHash and gitCommit

These parameters work together to define the sync range:

gitFromHashgitCommitSync Behavior
-1File listFull history is considered, but only the listed files are uploaded.
-1Commit hashFull history up to that commit.
abc123def456Synchronizes changes between two commits. For example, from commit abc123 to commit def456.
abc123File listSynchronizes only listed files starting from commit abc123. 

Common usage scenarios

  • Full Baseline synchronization (Multibranch Pipeline) : For initial synchronization or when complete branch history is needed. For example:
    -gitFromHash -1
    -gitCommit "file1:file2:file3:..."

    Here, only the changed files from the latest commit are synchronized to Code Pipeline, establishing the baseline while ignoring other repository changes.
  • Incremental synchronization between commits:For syncing changes between two specific commits. For example:
    -gitFromHash abc123def
    -gitCommit xyz789abc

    Here, only changes between the two commits are synced.
  • Selective file synchronization: When only specific files need synchronization. For example:
    -gitFromHash -1
    -gitCommit "ASM/CLASMS10.asm:ASM/CLASMS09.asm"

    Here, only the two ASM files are uploaded to Code Pipeline, ignoring all other repository changes.

Load components into Code Pipeline

The load operation is used to load components into Code Pipeline using repository-to-type mappings defined in the ispwconfig.yml file. For example:

IspwCLI.bat \
  -host cw09.bmc.com -port 47624 \
  -id pinmxj0 -pass ****** \
  -code 1047 -timeout 0 \
  -ispwServerConfig TPTP \
  -ispwServerStream PLAY \
  -ispwServerApp PLAY \
  -ispwServerSubAppl PLAY \
  -ispwContainerCreation per-commit \
  -operation load \
  -ispwConfigPath ispwconfig.yml \
  -componentFiles COB/TPROG10.cbl \
  -ispwAssignDesc test \
  -ispwMappingLevel dev1 \
  -targetFolder rjk2

Required parameters

ParameterDescription
-operation loadSpecifies the load operation
-ispwConfigPathPath to the ispwconfig.yml file
-componentFilesComponent file paths to load
-ispwMappingLevelTarget level for loading components
-ispwServerConfigCode Pipeline runtime configuration
-ispwServerStreamCode Pipeline stream name
-ispwServerAppCode Pipeline application name

Optional parameters

ParameterDescription
-ispwServerSubApplCode Pipeline sub-application
-ispwAssignDescAssignment description
-typeOverrideOverrides the component type resolved from path mappings
-targetFolderLocal folder for processing output

The following are the execution outcome:

  • Components are loaded into Code Pipeline.
  • Component types are determined using the configured path mappings.
  • Assignment information is recorded when provided.

Generate components

The generate operation is used to generate previously loaded components.For example

IspwCLI.bat \
  -host cw09.bmc.com -port 47624 \
  -id pinmxj0 -pass ****** \
  -code 1047 -timeout 0 \
  -ispwServerConfig TPTP \
  -ispwServerStream PLAY \
  -ispwServerApp PLAY \
  -ispwServerSubAppl PLAY \
  -ispwContainerCreation per-commit \
  -operation generate \
  -ispwConfigPath ispwconfig.yml \
  -componentFiles COB/TPROG10.cbl \
  -ispwAssignDesc test \
  -ispwMappingLevel dev1 \
  -targetFolder rjk2

Required parameters

ParameterDescription
-operation generateSpecifies the generate operation
-ispwConfigPathPath to ispwconfig.yml
-componentFilesComponent file paths
-ispwMappingLevelMapping level

Optional parameters

ParameterDescription
-ispwAssignDescAssignment description
-targetFolderLocal folder for generated output

The following are the execution outcome:

  • Components are generated according to Code Pipeline rules.

  • Generation results are recorded in Code Pipeline history.

Build components

The build operation is used to build generated components. The component must be generated successfully before running the build operation. For example:

IspwCLI.bat \
  -host cw09.bmc.com -port 47624 \
  -id pinmxj0 -pass ****** \
  -code 1047 -timeout 0 \
  -ispwServerConfig TPTP \
  -ispwServerStream PLAY \
  -ispwServerApp PLAY \
  -ispwServerSubAppl PLAY \
  -ispwContainerCreation per-commit \
  -operation build \
  -ispwConfigPath ispwconfig.yml \
  -componentFiles COB/TPROG10.cbl \
  -ispwAssignDesc test \
  -ispwMappingLevel dev1 \
  -targetFolder rjk2

Required parameters

ParameterDescription
-operation buildSpecifies the build operation
-ispwConfigPathPath to ispwconfig.yml
-componentFilesComponent file paths
-ispwMappingLevelMapping level

Optional parameters

ParameterDescription
-ispwAssignDescAssignment description
-targetFolderLocal folder for build output

The following are the execution outcome:

  • Components are built according to Code Pipeline build rules.
  • Build status and results are recorded in Code Pipeline.

Download components from Code Pipeline

The SCMDownloaderCLI is used to download components from a Code Pipeline container to a local directory.

Required parameters

ParameterDescription
-hostCode Pipeline server host name or IP address
-portCode Pipeline server port number
-idCode Pipeline user ID
-passCode Pipeline user password
-codeHost code page (for example, 1047)
-ispwServerConfigCode Pipeline runtime configuration
-ispwContainerNameCode Pipeline container name
-ispwContainerTypeContainer type identifier
-ispwServerLevelCode Pipeline level
-scm ispwcSpecifies Code Pipeline as the SCM provider
-targetFolderLocal folder for downloaded components

Optional parameters

ParameterDescription
-timeoutConnection timeout in minutes
-protocolEncryption protocol
-keystoreKeystore file path or reserved keystore name
-keystorePasswordKeystore password
-certificateBase-64 encoded certificate string
-certificateAliasCertificate alias
-ispwComponentTypeComponent type to download
-ispwDownloadAllDownloads all components from the container when set to true
-ispwDownloadInclIncludes dependent components when set to true
-dataLocal working directory for CLI processing

The following are the execution outcome:

  • Components from the specified Code Pipeline container are downloaded to the target folder.
  • Component filters and dependency options control which components are included.

Important

  • Mask sensitive values such as passwords, tokens, and keystore credentials in scripts.
  • Store credentials in secure CI/CD credential stores. For example, Jenkins or ADO.
  • Keep ispwconfig.yml under version control.
  • Use consistent code page (1047) and protocol settings across environments.

Configuration file and path mappings (ispwconfig.yml)

The ispwconfig.yml file defines default connection information and repository-to-component type mappings used by the Code Pipeline CLI during load, generate, and build operations.

This file enables the CLI to determine how source files in a repository are mapped to Code Pipeline component types and applications.

The ispwconfig.yml file is used to:

  • Define Code Pipeline connection defaults
  • Identify the target application, stream, and runtime configuration
  • Map repository paths and file extensions to Code Pipeline component types
  • Control how components are interpreted during load, generate, and build operations

The following example illustrates a typical ispwconfig.yml file

!!com.compuware.ispw.wzzms.models.IspwRoot
ispwApplication:
  application: HARY
  encryptionProtocol: None
  host: CW09
  hostCodePage: '1047'
  pathMappings:
  - path: \COB
    types:
    - fileExtension: cbl
      ispwType: COB
  port: 47624
  readWriteTimeout: 90
  runtimeConfig: tptp
  stream: TOPAZ
  subAppl: HARY
  sandbox: Y

Path mapping logic

Path mappings define how repository files are associated with Code Pipeline component types. Mapping is resolved using the repository path and the file extension

Example

If the following file is processed:

COB/TPROG10.cbl

And the ispwconfig.yml file contains:

  • A path mapping for \COB
  • A file extension mapping for cbl

Then the file is loaded as the Code Pipeline component type COB.

Handling unmapped components

If a file does not match any configured path or file extension mapping, the CLI cannot determine the component type.

In this case, use the -typeOverride parameter to explicitly specify the Code Pipeline component type. This parameter forces the component to be processed as the specified type.

Example

-typeOverride COB

The ispwconfig.yml file is required for the following operations:

  • load
  • generate
  • build

Troubleshooting

The following are the guidance to diagnose common issues when running Code Pipeline CLI commands.

IssuePossible causeResolution
Connection or TLS errorsIncorrect host, port, or protocol configurationVerify the values provided for -host, -port, and -protocol. Confirm that the appropriate certificate or keystore parameters are configured when using secure connections.
Authentication failuresInvalid credentials or certificate configurationVerify the user ID and password, or confirm that the keystore, certificate alias, or base-64 certificate string is valid and accessible.
Character encoding issuesIncorrect host code pageValidate that the correct code page is specified using the -code parameter (commonly 1047).
Missing files during Git synchronizationIncorrect Git branch, commit, or local pathVerify the values provided for -gitBranch, -gitCommit, and -gitFromHash. Confirm that the local Git repository path is correct and accessible.
Components not loaded or mappedMissing or incorrect path mappingsReview the ispwconfig.yml file to ensure that path and file extension mappings are correctly defined. Use -typeOverride if required.

Appendix: Command templates

The following templates provide a starting point for constructing Code Pipeline CLI commands. Replace placeholder values with environment-specific information.

Synchronize Git content template

IspwCLI.bat \
  -host <HOST> -port <PORT> \
  -id <USER> -pass ****** \
  -code 1047 -timeout 0 \
  -ispwServerConfig <RUNTIME_CONFIG> \
  -gitRepoUrl <REPO_URL> \
  -gitUsername <GIT_USER> -gitPassword ****** \
  -gitBranch <BRANCH> \
  -gitCommit <HASH_OR_FILELIST> \
  -gitFromHash -1 \
  -ispwServerStream <STREAM> \
  -ispwServerApp <APP> \
  -ispwServerSubAppl <SUBAPPL> \
  -ispwCheckoutLevel <LEVEL> \
  -ispwContainerCreation per-commit \
  -gitLocalPath <WORKSPACE> \
  -targetFolder <WORKSPACE> \
  -operation syncGitToIspw

Load, generate, and build template

IspwCLI.bat \
  -host <HOST> -port <PORT> \
  -id <USER> -pass ****** \
  -code 1047 -timeout 0 \
  -ispwServerConfig <RUNTIME_CONFIG> \
  -ispwServerStream <STREAM> \
  -ispwServerApp <APP> \
  -ispwServerSubAppl <SUBAPPL> \
  -ispwCheckoutLevel <LEVEL> \
  -ispwContainerCreation per-commit \
  -operation <load|generate|build> \
  -ispwConfigPath ispwconfig.yml \
  -componentFiles <FILEPATH> \
  -ispwAssignDesc "<DESCRIPTION>" \
  -ispwMappingLevel <LEVEL> \
  -targetFolder <WORKSPACE>

Code Pipeline CLI parameters and configuration

The Code Pipeline CLI synchronizes source from Git to Code Pipeline. The following are the available parameters:

Parameter

Description

-assignmentPrefix

The prefix used to create the Code Pipeline assignment.

-gitBranch <arg>

The target Git branch name

-gitCommit <arg>

The Git commit hash (long or short) or a colon-delimited list of file paths in the workspace

-gitFromHash <arg>

A Git hash to start syncing a list of commits which is not included in the sync, or -1 for multibranch project support

-gitLocalPath <arg>

The location of the local Git repository

-gitPassword <arg>

Git password

-gitRepoUrl <arg>

Git Repository URL

-gitUsername <arg>

Git user name

-ispwCheckoutLevel <arg>

The test level to check components out to

-ispwContainerCreation <arg>

The option to indicate how often to create a new Code Pipeline container

-ispwContainerDescription <arg>

The custom description to be used for the Code Pipeline container

-ispwServerApp <arg>

The Code Pipeline application

-ispwServerConfig <arg>

The Code Pipeline server config

-ispwServerStream <arg>

The Code Pipeline stream name

-operation <arg>

The Code Pipeline operation to perform

-targetFolder <arg>

The target folder where the output of the operation will be saved

For an example of using the CLI (the plugin to be precise), refer to the Git to Code Pipeline Integration - A Tutorial.

Code Pipeline property settings

The following are the property settings required by the CLI parameters:

Property

Sync Git to Code Pipeline

Load operation

stream

CLI parameter

ispwconfig.yml

application

CLI parameter

ispwconfig.yml

subAppl

CLI parameter

ispwconfig.yml

assignmentPrefix

CLI parameter

ispwconfig.yml

host

CLI parameter

ispwconfig.yml
(If it exists as a CLI parameter then it is overwritten by default)

port

CLI parameter

ispwconfig.yml
(If it exists as a CLI parameter then it is overwritten by default)

hostCodePage

CLI parameter

VSCode Settings (If it exists as a CLI parameter then it is overwritten by default)

readWriteTimeout

CLI parameter

VSCode Settings (If it exists as a CLI parameter then it is overwritten by default)

encryptionProtocol

CLI parameter

VSCode Settings (If it exists as a CLI parameter then it is overwritten by default)

runtimeConfig

CLI parameter

ispwconfig.yml
(If it exists as a CLI parameter then it is overwritten by default)

Examples of CLI using certificate authentication

The following are few sample certificates used by IspwCLI.bat:

With ID and Password

IspwCLI.bat -host "your-hci-host" -port "your-hci-port" -id "your-user-name" -pass "your-user-password" -code "your-codepage-connection" -timeout 0 -ispwServerConfig TPZP -gitRepoUrl "your-git-repository-url" -gitUsername "your-git-username" -gitPassword "your-git-password" -gitBranch "your-target-git-branch-name" -gitCommit "your-git-commit-hash" -gitFromHash -1 -ispwServerStream PLAY -ispwServerApp PLAY -ispwCheckoutLevel DEV1 -ispwContainerCreation per-commit -gitLocalPath "your-local-gitrepository-location" -targetFolder "your-target-folder-location" -operation syncGitToIspw

With keystore

IspwCLI.bat -host "your-hci-host" -port "your-hci-port" -keystore "your-keystore-username" -keystorePassword "your-keystore-user-password" -certificateAlias "your-certificate-alias" -code "your-codepage-connection" -timeout 0 -ispwServerConfig TPZP -operation syncGitToIspw -gitRepoUrl "your-git-repository-url" -gitUsername "your-git-username" -gitPassword "your-git-password" -gitBranch "your-target-git-branch-name" -gitCommit "your-git-commit-hash" -gitFromHash -1 -ispwServerStream PLAY -ispwServerApp PLAY -ispwCheckoutLevel DEV1 -ispwContainerCreation per-commit -gitLocalPath "your-local-gitrepository-location" -targetFolder "your-target-folder-location"

With certificate base-64 string

IspwCLI.bat -operation syncGitToIspw -host "your-hci-host" -port "your-hci-port" -certificate "your-base64-certificate-string"-protocol None -code 1047 -timeout "90" -targetFolder "your-target-folder-location" -ispwServerConfig tpzp -ispwServerStream PLAY -ispwServerApp PLAY -ispwCheckoutLevel DEV1 -ispwContainerCreation per-commit -gitUsername "your-git-username" -gitPassword "your-git-password" -gitRepoUrl "your-git-repository-url" -gitBranch "your-target-git-branch-name" -gitFromHash -1 -gitLocalPath "your-local-gitrepository-location"

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI DevX Mainframe DevOps