0.0.11 • Published 1 year ago

@serverless-cd/checkout v0.0.11

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

下载仓库代码(@serverless-cd/checkout)

快速体验

- plugin: "@serverless-cd/checkout"
  inputs:
   # 通过分支或者tag来下载仓库,比如:refs/heads/main 或者 refs/tags/v0.0.1
    ref: ""

    # 通过commit id来下载仓库
    commit: ""

    # 用于下载仓库的个人访问令牌 比如:github的个人访问令牌(https://github.com/settings/tokens)。
    token: ""

    # 支持下载的代码托管平台(github、gitee、gitlab、codeup)
    provider: ""

    # 仓库的克隆地址,比如:https://gitee.com/shihuali/checkout.git
    clone_url: ""

    # 仓库owner,比如clone_url为https://gitee.com/shihuali/checkout.git时,owner应为 shihuali
    owner: ""

    # 代码下载目录
    exec_dir: ""

字段解析

参数说明类型必填默认值
ref通过分支或者 tag 来下载仓库,比如:refs/heads/main 或者 refs/tags/v0.0.1string
commit通过 commit id 来下载仓库string
exec_dir代码下载目录string临时目录
token用于下载仓库的个人访问令牌 比如:github 的个人访问令牌string
provider支持下载的代码托管平台enum:github、gitee、gitlab、codeup
clone_url仓库的克隆地址string
owner仓库 ownerstring

注意 Engine 调用方式

对于 checkout 插件而言,调用 engine 的时候需要注入 checkout 插件所需要的参数

const engine = new Engine({
  cwd: __dirname,
  steps,
  logConfig: { logPrefix },
  inputs: {
    git: {
      token: "xxx",  // 必填
      provider: "gitee", // 必填
      owner: "shihuali", // 必填
      clone_url: "https://gitee.com/shihuali/checkout.git", // 必填
      exec_dir: "./checkout", // 选填
      ref: "refs/heads/main", // 选填
      commit: 'xx' // 选填
    },
  },
});
await engine.start();

作为普通的 NPM Module 使用

0.0.10

1 year ago

0.0.11

1 year ago

0.0.1

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.1-alpha.40

2 years ago

0.0.1-alpha.39

2 years ago

0.0.1-alpha.38

2 years ago

0.0.1-alpha.37

2 years ago

0.0.1-alpha.30

2 years ago

0.0.1-alpha.29

2 years ago