squid/.drone/lib/images.libsonnet

57 lines
1.1 KiB
Plaintext
Raw Normal View History

2020-08-05 07:30:16 +00:00
local util = import 'util.libsonnet';
{
docker: {
name: 'docker',
image: 'docker:dind',
},
scp(target): {
name: 'scp',
image: 'appleboy/drone-scp',
settings: {
host: {
from_secret: 'ssh-host',
},
username: {
from_secret: 'ssh-user',
},
/*password: {
from_secret: 'ssh-password',
},*/
key: {
from_secret: 'ssh-key',
},
port: {
from_secret: 'ssh-port',
},
command_timeout: '2m',
target: target,
source: [
'.',
],
},
},
ssh: {
image: 'appleboy/drone-ssh',
settings: {
host: util.fromSecret("ssh-host"),
port: util.fromSecret("ssh-port"),
username: util.fromSecret("ssh-user"),
password: util.fromSecret("ssh-password"),
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,
],
}
}