编程语言/Drone:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
第25行: 第25行:
   retries: 3</syntaxhighlight>
   retries: 3</syntaxhighlight>


Drone默认clone不会fetch tag,如果需要可以通过以下配置:
Drone clone 不会默认 fetch tag、submodules 等,但可以通过镜像单独设置:


<syntaxhighlight lang="yaml">
<syntaxhighlight lang="yaml">
第33行: 第33行:
   commands:
   commands:
   - git fetch --tags</syntaxhighlight>
   - git fetch --tags</syntaxhighlight>
<syntaxhighlight lang="yaml">
steps:
- name: submodules
  image: alpine/git
  commands:
  - git submodule update --init --recursive</syntaxhighlight>


== 关键词 ==
== 关键词 ==

2026年3月18日 (三) 15:51的版本

标题文本

部署

流水线

流水线类型
docker ssh kubernetes exec
kind: pipeline
type: ssh
name: push-verdaccio

workspace

workspace:
  path: drone/src

clone

clone:
  depth: 50
  retries: 3

Drone clone 不会默认 fetch tag、submodules 等,但可以通过镜像单独设置:

steps:
- name: fetch
  image: alpine/git
  commands:
  - git fetch --tags
steps:
- name: submodules
  image: alpine/git
  commands:
  - git submodule update --init --recursive

关键词

event 示例 示例
示例 示例 示例
示例 示例 示例

环境变量

内置变量

Secret

插件

https://plugins.drone.io/

实践

缓存依赖 报告上传 矩阵测试
通知集成 示例 示例
示例 示例 示例

实例

标题文本
版本提升发布 拉取代码 执行部署 代码编译
示例 示例 示例
示例 示例 示例

功能

scp ssh rsync
示例 示例 示例
示例 示例 示例