Process migrator node.js utility for VSTS inherited process
Перейти к файлу
Liang Zhu 4bfd0e6b5e
Merge pull request #6 from liang2zhu1/squash2
Bug fixes, refactor for future support of web usage and clean up.
2018-05-25 16:39:39 -07:00
.vscode Make consistent control/group/page constribution option 2018-05-25 16:10:31 -07:00
src Make consistent control/group/page constribution option 2018-05-25 16:10:31 -07:00
.gitignore Fix up documentation and metadata files, remove the requirement of private vso-node-api binary, detect and ban import/export non-inherited process 2018-05-15 17:03:45 -07:00
.npmignore Make consistent control/group/page constribution option 2018-05-25 16:10:31 -07:00
LICENSE Initial commit 2018-04-20 11:24:34 -07:00
README.md README update 2018-05-25 16:23:34 -07:00
configuration.json Add command line argument support also refactoring for better performance ( not done done yet) 2018-05-02 18:10:19 -07:00
package-lock.json Final update before publicize 2018-05-24 19:03:07 -07:00
package.json Make consistent control/group/page constribution option 2018-05-25 16:10:31 -07:00

README.md

VSTS Process Migrator for Node.js

This application provide you ability to automate the Process export/import across VSTS accounts through Node.js CLI.

NOTE: This only works with 'Inherited Process', for 'XML process' you may upload/download process as ZIP.

Getting Started

Run

  • Install npm if not yet - link

  • Install this package through npm install process-migrator -g

  • Create and fill required information in config file configuration.json. See doc section for details

    Just run processMigrator will create the file if not exist.

    CONFIGURATION FILE HAS PAT, RIGHT PROTECT IT !
  • Run processMigrator [--mode=<migrate(default)import/export> [--config=<your-configuration-file-path>]

Contribute

  • From the root of source, run npm install
  • Build by npm run build
  • Execute through node build\nodejs\nodejs\main.js <args>

Documentation

Command line parameters
  • --mode: Optional, defaulted to 'migrate'. Mode of the execution, can be 'migrate' (export and then import), 'export' (export only) or 'import' (import only).
  • --config: Optional, default to './configuration.json'. Specify the configuration file.
Configuration file strcuture
  • This file is in JSONC format, you don't have to remove comments lines for it to work.
{
    "sourceAccountUrl": "Required in 'export'/'migrate' mode, source account url.",
    "sourceAccountToken": "!!TREAT THIS AS PASSWORD!! Required in 'export'/'migrate' mode, personal access token for source account.",
    "targetAccountUrl": "Required in 'import'/'migrate' mode, target account url.",
    "targetAccountToken": "!!TREAT THIS AS PASSWORD!! Required in 'import'/'migrate' mode, personal access token for target account.",
    "sourceProcessName": "Required in 'export'/'migrate' mode, source process name.",
    "targetProcessName": "Optional, set to override process name in 'import'/'migrate' mode.",
    "options": {
        "processFilename": "Required in 'import' mode, optional in 'export'/'migrate' mode to override default value './output/process.json'.",
        "logLevel":"Optional, default as 'Information'. Logs at or higher than this level are outputed to console and rest in log file. Possiblee values are 'Verbose'/'Information'/'Warning'/'Error'.",
        "logFilename":"Optional, default as 'output/processMigrator.log' - Set to override default log file name.",
        "overwritePicklist": "Optional, default is 'false'. Set true to overwrite picklist if exists on target. Import will fail if picklist exists but different from source.",
        "continueOnRuleImportFailure": "Optional, default is 'false', set true to continue import on failure importing rules, warning will be provided.",
        "skipImportFormContributions": "Optional, default is 'false', set true to skip import control contributions on work item form.",
    }
}
Notes
  • If extensions used by source account are not available in target account, import MAY fail
    1. Control/Group/Page contributions on work item form are by default imported, so it will fail if the extension is not available on target account. use 'skipImportFormContributions' option to skip importing custom controls.
  • If identities used in field default value or rules are not available in target account, import WILL fail
    1. For rules you may use 'continueOnRuleImportFailure' option to proceed with rest of import when such error is occurred.
    2. For identity field default value, you may use 'continueOnFieldDefaultValueFailure' option to proceed with rest of import when such error is occurred.