.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Giles Bradshaw 2020-04-26 14:58:26 +01:00
parent 345d8e503c
commit 724fdc584a
1 changed files with 3 additions and 51 deletions

View File

@ -6,34 +6,10 @@ load("@this//:environment.star", "environment")
load("@this//:echo.star", "echo")
load("@this//:export.star", "export")
load("@this//:echo-secret.star", "echoSecret")
load("@this//:wait.star", "wait")
load("@this//:build.star", "build")
load("@this//:scp.star", "scp")
def wait(delay, name):
return {
"name": name,
"image": "alpine",
"commands": [
"sleep {delay}".format(delay = delay),
],
}
def build(name):
return {
"name": "build-{name}".format(name=name),
"image": "docker:dind",
"volumes": [
{
"name": "dockersock",
"path": "/var/run",
},
],
"environment": environment([
"local-docker-registry",
]),
"commands": [
"cd {name}".format(name=name),
"docker build . -t $${{LOCAL_DOCKER_REGISTRY}}{name}".format(name=name),
"docker push $${{LOCAL_DOCKER_REGISTRY}}{name}".format(name=name),
],
}
def buildHome():
return {
"name": "build-nginx-home",
@ -72,30 +48,6 @@ def buildNginx(name):
],
}
def scp(target):
return {
"name": "scp files",
"image": "appleboy/drone-scp",
"settings": {
"host": {
"from_secret": "ssh-host",
},
"username": {
"from_secret": "ssh-user",
},
"password": {
"from_secret": "ssh-password",
},
"port": {
"from_secret": "ssh-port",
},
"command_timeout": "2m",
"target": target,
"source": [
".",
],
},
}
def deploy(
filename,
folder,