39 lines
722 B
Plaintext
39 lines
722 B
Plaintext
local util = import 'util.libsonnet';
|
|
local settings = import 'settings.libsonnet';
|
|
{
|
|
docker: {
|
|
name: 'docker',
|
|
image: 'docker:dind',
|
|
},
|
|
scp(target): settings.ssh {
|
|
name: 'scp',
|
|
image: 'appleboy/drone-scp',
|
|
settings +: {
|
|
command_timeout: '2m',
|
|
target: target,
|
|
source: [
|
|
'.',
|
|
],
|
|
},
|
|
},
|
|
ssh: settings.ssh {
|
|
image: 'appleboy/drone-ssh',
|
|
settings +: {
|
|
envs: [
|
|
'drone_tag',
|
|
'drone_commit',
|
|
'drone_build_number',
|
|
'drone_repo_name',
|
|
'drone_repo_namespace',
|
|
],
|
|
script: [],
|
|
},
|
|
},
|
|
wait(delay): {
|
|
image: 'alpine',
|
|
name: 'wait',
|
|
commands: [
|
|
'sleep %s' % delay,
|
|
],
|
|
}
|
|
} |