2020-08-15 09:43:20 +00:00
|
|
|
local settings = import 'settings.libsonnet';
|
|
|
|
{
|
2020-08-28 11:22:28 +00:00
|
|
|
docker(overide): {
|
2020-08-15 09:43:20 +00:00
|
|
|
name: 'docker',
|
2020-08-28 11:22:28 +00:00
|
|
|
image: 'docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f',
|
|
|
|
} + overide,
|
|
|
|
scp(overide): function(target) settings.ssh {
|
2020-08-15 09:43:20 +00:00
|
|
|
name: 'scp',
|
2020-08-28 11:22:28 +00:00
|
|
|
image: 'appleboy/drone-scp:1.6.2@sha256:bd37a55f4b97e7742b0de7333669b96220b3cc422d366e1fa8c34059b736ab47',
|
2020-08-15 09:43:20 +00:00
|
|
|
settings +: {
|
|
|
|
command_timeout: '2m',
|
|
|
|
target: target,
|
|
|
|
source: [
|
|
|
|
'.',
|
|
|
|
],
|
|
|
|
},
|
2020-08-28 11:22:28 +00:00
|
|
|
} + overide,
|
|
|
|
ssh(overide): settings.ssh {
|
|
|
|
image: 'appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea',
|
2020-08-15 09:43:20 +00:00
|
|
|
settings +: {
|
|
|
|
envs: [
|
|
|
|
'drone_tag',
|
|
|
|
'drone_commit',
|
|
|
|
'drone_build_number',
|
|
|
|
'drone_repo_name',
|
|
|
|
'drone_repo_namespace',
|
|
|
|
],
|
|
|
|
script: [],
|
|
|
|
},
|
2020-08-28 11:22:28 +00:00
|
|
|
} + overide,
|
|
|
|
wait(overide): function(delay) {
|
|
|
|
image: 'alpine:3.12.0@sha256:90baa0922fe90624b05cb5766fa5da4e337921656c2f8e2b13bd3c052a0baac1',
|
2020-08-15 09:43:20 +00:00
|
|
|
name: 'wait',
|
|
|
|
commands: [
|
|
|
|
'sleep %s' % delay,
|
|
|
|
],
|
2020-08-28 11:22:28 +00:00
|
|
|
} + overide
|
2020-08-15 09:43:20 +00:00
|
|
|
}
|