.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
355009f2f1
commit
c07c78f4ce
35
.drone.star
35
.drone.star
|
@ -1,3 +1,37 @@
|
|||
def fromSecret(name):
|
||||
return {
|
||||
"from_secret": name
|
||||
}
|
||||
def printenv():
|
||||
return {
|
||||
"name": "printenv",
|
||||
"image": "appleboy/drone-ssh",
|
||||
"environment": {
|
||||
"LOCAL_DOCKER_REGISTRY": fromSecret("local-docker-registry"),
|
||||
"SSH_HOST": fromSecret("ssh-host"),
|
||||
"SSH_USER": fromSecret("ssh-user"),
|
||||
"SSH_PORT": fromSecret("ssh-port"),
|
||||
},
|
||||
"settings": {
|
||||
"envs": [
|
||||
"local_docker_registry",
|
||||
"ssh_host",
|
||||
"ssh_user",
|
||||
"ssh_port",
|
||||
],
|
||||
"host": fromSecret("ssh-host"),
|
||||
"port": fromSecret("ssh-port"),
|
||||
"username": fromSecret("ssh-user"),
|
||||
"password": fromSecret("ssh-password"),
|
||||
"script": [
|
||||
"echo SSH_HOST=$SSH_HOST > env-stack",
|
||||
"echo SSH_PORT=$SSH_PORT >> env-stack",
|
||||
"echo LOCAL_DOCKER_REGISTRY=$LOCAL_DOCKER_REGISTRY >> env-stack",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
def steps(name):
|
||||
return {
|
||||
"kind": "pipeline",
|
||||
|
@ -18,6 +52,7 @@ def steps(name):
|
|||
|
||||
def main(ctx):
|
||||
return [
|
||||
printenv(),
|
||||
steps('first'),
|
||||
steps('second'),
|
||||
]
|
||||
|
|
Reference in New Issue