2021-08-03 22:07:15 +00:00
|
|
|
---
|
2023-03-16 16:36:33 +00:00
|
|
|
kind: "pipeline"
|
|
|
|
type: "docker"
|
|
|
|
name: "default"
|
2022-03-18 20:10:54 +00:00
|
|
|
|
2022-03-25 19:12:06 +00:00
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-03-18 20:10:54 +00:00
|
|
|
|
2022-03-25 19:12:06 +00:00
|
|
|
steps:
|
2023-03-16 16:36:33 +00:00
|
|
|
- name: "test"
|
|
|
|
image: "golang:1.20"
|
2021-08-03 22:07:15 +00:00
|
|
|
volumes:
|
2023-03-16 16:36:33 +00:00
|
|
|
- name: "modules"
|
|
|
|
path: "/go/pkg/mod"
|
2022-02-01 19:51:53 +00:00
|
|
|
commands:
|
2023-03-16 16:36:33 +00:00
|
|
|
- "make check"
|
2022-03-18 20:10:54 +00:00
|
|
|
|
2023-03-16 16:36:33 +00:00
|
|
|
- name: "build"
|
|
|
|
image: "golang:1.20"
|
2021-08-03 22:07:15 +00:00
|
|
|
volumes:
|
2023-03-16 16:36:33 +00:00
|
|
|
- name: "modules"
|
|
|
|
path: "/go/pkg/mod"
|
2021-08-03 22:07:15 +00:00
|
|
|
commands:
|
2023-03-16 16:36:33 +00:00
|
|
|
- "make"
|
2021-08-03 22:07:15 +00:00
|
|
|
depends_on:
|
2023-03-16 16:36:33 +00:00
|
|
|
- "test"
|
2022-03-18 20:10:54 +00:00
|
|
|
|
2023-03-16 16:36:33 +00:00
|
|
|
- name: "delivery"
|
|
|
|
image: "drillster/drone-rsync"
|
2022-06-09 18:01:46 +00:00
|
|
|
settings:
|
2023-03-16 16:36:33 +00:00
|
|
|
hosts:
|
|
|
|
from_secret: "SSH_HOST_IP"
|
2022-06-09 18:01:46 +00:00
|
|
|
key:
|
2023-03-16 16:36:33 +00:00
|
|
|
from_secret: "SSH_PRIVATE_KEY"
|
|
|
|
source: "./auth"
|
|
|
|
target: "/etc/auth/auth"
|
|
|
|
prescript:
|
|
|
|
- "systemctl stop auth"
|
2022-06-09 18:01:46 +00:00
|
|
|
script:
|
2023-03-16 16:36:33 +00:00
|
|
|
- "systemctl start auth"
|
2022-03-25 19:12:06 +00:00
|
|
|
depends_on:
|
|
|
|
- build
|
2022-06-09 18:01:46 +00:00
|
|
|
when:
|
2022-06-10 09:48:39 +00:00
|
|
|
branch:
|
|
|
|
- master
|
2022-06-09 18:01:46 +00:00
|
|
|
|
2021-08-03 22:07:15 +00:00
|
|
|
volumes:
|
2022-03-25 19:12:06 +00:00
|
|
|
- name: modules
|
2022-02-01 19:51:53 +00:00
|
|
|
temp: {}
|