2020-04-18 18:17:59 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: deploy
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: submodules
|
|
|
|
image: alpine/git
|
|
|
|
commands:
|
2020-04-18 22:01:46 +00:00
|
|
|
- git submodule update --init --recursive --remote
|
2020-04-18 22:07:19 +00:00
|
|
|
- cat .gitmodules | grep 'path =' | awk '{ print $3 }'| while read -r path; do
|
2020-04-18 22:00:37 +00:00
|
|
|
- cd "$path"
|
|
|
|
- git pull origin master
|
|
|
|
- cd -
|
|
|
|
- done
|
2020-04-18 18:17:59 +00:00
|
|
|
|
|
|
|
- name: deploy
|
|
|
|
image: drillster/drone-rsync
|
2020-04-18 18:38:13 +00:00
|
|
|
settings:
|
2020-04-18 18:41:30 +00:00
|
|
|
hosts: 10.69.0.2
|
2020-04-18 18:38:13 +00:00
|
|
|
port: 3022
|
|
|
|
key:
|
|
|
|
from_secret: starlark_ssh_key
|
2020-04-18 18:57:17 +00:00
|
|
|
source: ./lib/
|
|
|
|
target: /starlark/lib_new/
|
2020-04-18 18:38:13 +00:00
|
|
|
recursive: 'true'
|
2020-04-18 22:09:02 +00:00
|
|
|
exclude:
|
|
|
|
- ".git/"
|
|
|
|
- ".git"
|
2020-04-19 00:13:48 +00:00
|
|
|
- "LICENSE"
|
|
|
|
- "README"
|
|
|
|
- "README.md"
|
2020-04-18 18:57:17 +00:00
|
|
|
script:
|
|
|
|
- cd /starlark
|
|
|
|
- mv lib lib_old
|
|
|
|
- mv lib_new lib
|
|
|
|
- rm -Rf lib_old
|
2020-04-18 18:17:59 +00:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|