rfhouse-html

1.1.0 • Public • Published

手动触发jeknis构建

  • 1.yarn install 下载依赖包
  • 2.yarn dev 触发jenkis构建开发环境dev_branch分支
  • 3.yarn test 触发jenkis构建测试环境dev_branch分支
  • 4.yarn test:tag 触发jenkis构建测试环境tag分支分支(优势就是可以在当前分支自动打tag进行构建不需要合并代码)
    Usage:node jenkins [options] [command]

    这是一个命令行工具

    Options:
    -V, --version                  output the version number
    -project,--project [name]      build you develop project name
    -token,--apitoken [apitoken]   send your api token
    -author,--author [name]        send your author
    -trigger,--triggerName [name]  send your triggerName
    -branch,--gitBranch [name]     send your gitBranch/tags
    -h, --help                     display help for command

    Commands:
    setup [env]                    run setup commands for all envs
    help [command]                 display help for command

    Examples:
    $ custom-help --help
    $ custom-help -h
    
   代码执行模块:
    "dev": "node jenkins --project rfhouse-html-dev --gitBranch */dev_branch setup dev",
    "test": "node jenkins --project rfhouse-html-test-bytag --gitBranch */dev_branch setup test",
    "build": "node jenkins --project rfhouse-html-bytag --branch xx setup build",
    "test:tag": "node jenkins --project rfhouse-html-test-bytag --autotag true setup test"

   逻辑解析:
   -> node 执行 jenkins.js 
   -> 然后传入参数 
    --project yourproject(ex:rfhouse-html-test-bytag) 
    --gitBranch yourbranch/yourtagname(ex:*/dev_branch||refs/tags/d20207281029) 
    --autotag true (ex:自动创建tag refs/tags/d20207281029) 
   -> npm run test 将你的测试分支构建去服务器

注意

  • 默认不传为dev_branch
  • 正式环境的jenkis还是手动或者传入分支进行构建 xx替换为生成分支/tag
  • 之前的jenkis直接点击构建不影响
  • 目前生成构建暂不支持默认分支构建 如有需要请慎重传入tag/分支构建
  • 无法使用git命令的同学 注意查看配置git命令 http://note.youdao.com/s/SUkvR3kJ
  • 配置jenkis环境项目http://note.youdao.com/s/Gl79RraM

Readme

Keywords

none

Package Sidebar

Install

npm i rfhouse-html

Weekly Downloads

0

Version

1.1.0

License

ISC

Unpacked Size

7.32 kB

Total Files

3

Last publish

Collaborators

  • lizhang