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

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
 
(未显示同一用户的11个中间版本)
第2行: 第2行:
[[/部署|部署]]
[[/部署|部署]]
== 流水线 ==
== 流水线 ==
<div>
<div style="display:flex;gap:10px;"><div>
{| class="wikitable"
{| class="wikitable"
|+ 流水线类型
|+ 流水线类型
|-
|-
| docker || ssh || kubernetes || exec
| docker || ssh || kubernetes || exec
|}
|}</div>
 
<div>
<syntaxhighlight lang="yaml">
<syntaxhighlight lang="yaml">
kind: pipeline
kind: pipeline
type: ssh
type: ssh
name: push-verdaccio</syntaxhighlight>
name: push-verdaccio</syntaxhighlight></div>
</div>
</div>
== workspace ==
<syntaxhighlight lang="yaml">
workspace:
  path: drone/src
</syntaxhighlight>
== clone ==
<syntaxhighlight lang="yaml">
clone:
  depth: 50
  retries: 3</syntaxhighlight>
Drone clone 不会默认 fetch tag、submodules 等,但可以通过镜像单独设置:
<syntaxhighlight lang="yaml">
clone:
  disable: true
steps:
- name: fetch
  image: alpine/git
  commands:
  - git fetch --tags</syntaxhighlight>
<syntaxhighlight lang="yaml">
clone:
  disable: true
steps:
- name: submodules
  image: alpine/git
  commands:
  - git submodule update --init --recursive</syntaxhighlight>


== 关键词 ==
== 关键词 ==
第27行: 第59行:
=== 内置变量 ===
=== 内置变量 ===
=== Secret ===
=== Secret ===
== trigger ==
[[/trigger|trigger]]
== 插件 ==
== 插件 ==
https://plugins.drone.io/
https://plugins.drone.io/
第55行: 第90行:
| [[/scp|scp]] || [[/ssh|ssh]] || [[/rsync|rsync]]
| [[/scp|scp]] || [[/ssh|ssh]] || [[/rsync|rsync]]
|-
|-
| 示例 || 示例 || 示例
| [[/drone-volume-cache|drone-volume-cache]] || [[/plugins/docker|plugins/docker]] || [[/curlimages/curl|curlimages/curl]]
|-
|-
| 示例 || 示例 || 示例
| 示例 || 示例 || 示例
|}
|}

2026年3月18日 (三) 17:50的最新版本

标题文本

部署

流水线

流水线类型
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 等,但可以通过镜像单独设置:

clone:
  disable: true

steps:
- name: fetch
  image: alpine/git
  commands:
  - git fetch --tags
clone:
  disable: true

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

关键词

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

环境变量

内置变量

Secret

trigger

trigger

插件

https://plugins.drone.io/

实践

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

实例

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

功能

scp ssh rsync
drone-volume-cache plugins/docker curlimages/curl
示例 示例 示例