composed secret printing

This commit is contained in:
Giles Bradshaw 2020-07-28 17:16:15 +01:00
parent 4ba904839d
commit 4324045b10
1 changed files with 15 additions and 9 deletions

View File

@ -181,18 +181,24 @@ local images = {
], ],
}, },
}, },
),/* ),
images.ssh { util.compose(
std.map(
function(s) util.envSet(s),
publicSecrets,
)
)(
images.ssh
)
{
name: 'deploy portainer', name: 'deploy portainer',
"environment": environment(secrets), settings +: {
"settings": {
"envs": [x.replace("-", "_") for x in secrets ],
username: util.fromSecret("ssh-root-user"), username: util.fromSecret("ssh-root-user"),
password: util.fromSecret("ssh-root-password"), password: util.fromSecret("ssh-root-password"),
script: [ script +: [
'set -e', 'set -e',
'echo go', 'echo go',
] + ] /*+
map(export, secrets) + map(export, secrets) +
[ [
"export DRONE_REPO_LINK=$${{DRONE_GITEA_SERVER}}/{namespace}/{name}".format(name=ctx.repo.name, namespace=ctx.repo.namespace), "export DRONE_REPO_LINK=$${{DRONE_GITEA_SERVER}}/{namespace}/{name}".format(name=ctx.repo.name, namespace=ctx.repo.namespace),
@ -202,9 +208,9 @@ local images = {
"docker stack rm {name}".format(name = name), "docker stack rm {name}".format(name = name),
"sleep 30", "sleep 30",
"docker stack deploy -c {filename} {name}".format(name= name, filename = filename), "docker stack deploy -c {filename} {name}".format(name= name, filename = filename),
] + commands ] + commands */
} }
}*/ }
], ],
} }
] ]