2
0
Fork 0

Add ssh test [SKIP CI]

pull/6/head
Ambrose Chua 2019-03-24 23:37:37 +08:00
parent b043307116
commit 0b10fc4165
2 changed files with 40 additions and 1 deletions

View File

@ -1,4 +1,19 @@
kind: pipeline
name: ssh-test
clone:
depth: 1
steps:
- name: ssh
image: appleboy/drone-ssh
settings:
host: staging.beepvoice.app
username: core
key:
from_secret: ssh_key
script:
- cd /home/core/website && ls
---
kind: pipeline
name: backend-auth
clone:
depth: 1

View File

@ -51,6 +51,30 @@ const yamls = dockers.map(f => ({
],
}))
const sshTest = {
kind: 'pipeline',
name: 'ssh-test',
clone: {
depth: 1,
},
steps: [
{
name: 'ssh',
image: 'appleboy/drone-ssh',
settings: {
host: 'staging.beepvoice.app',
username: 'core',
key: {
from_secret: 'ssh_key',
},
script: [
'cd /home/core/staging && ls'
],
},
},
],
};
const deploy = {
kind: 'pipeline',
name: 'deploy',
@ -116,7 +140,7 @@ const deploy = {
depends_on: dockers,
};
const droneyml = [].concat(yamls).concat(deploy).map(yaml.safeDump).join('---\n');
const droneyml = [].concat(sshTest).concat(yamls).concat(deploy).map(yaml.safeDump).join('---\n');
fs.writeFileSync(path.join(cwd, '.drone.yml'), droneyml);
console.log('Written to .drone.yml');