Drone CI 中文文档

Overview

An ssh pipeline executes shell commands on remote servers using the ssh protocol. This is useful for workloads that need to run directly on the host, or are poorly suited for execution inside containers.

Example pipeline configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
---
kind: pipeline
type: ssh
name: default

server:
  host: 1.2.3.4
  user: root
  password:
    from_secret: password

steps:
- name: greeting
  commands:
  - echo hello world

...

The kind and type attributes define an ssh pipeline.

1
2
3
---
kind: pipeline
type: ssh

The steps section defines a series of shell commands. These commands are executed on the remote server using the ssh protocol. If any command returns a non-zero exit code, the pipeline fails and exits.

10
11
12
13
steps:
- name: greeting
  commands:
  - echo hello world