From f11b192cbd54724c02f1aad45d84059d295b9b1b Mon Sep 17 00:00:00 2001 From: Giles Bradshaw Date: Tue, 4 Aug 2020 21:54:49 +0100 Subject: [PATCH] fix: removed redundant step from drone --- .drone/drone-home.jsonnet | 47 +++++++++++++-------------------------- .drone/drone-home.yml | 33 --------------------------- 2 files changed, 16 insertions(+), 64 deletions(-) diff --git a/.drone/drone-home.jsonnet b/.drone/drone-home.jsonnet index 15c7b4b..88a4f57 100644 --- a/.drone/drone-home.jsonnet +++ b/.drone/drone-home.jsonnet @@ -180,39 +180,24 @@ local images = { images.wait(15), util.compose( std.map( - function(secret) util.printEnv('afile', secret), - publicSecrets, - ) - )( - images.ssh { - name: 'will print ssh-host again', - settings +: { - script +: [ - 'rm afile' - ], - }, - }, - ), - util.compose( - std.map( - function(s) util.envSet(s), - publicSecrets + secretSecrets - ) + - std.map( - function(s) function(step) step { - settings +: { - script +: [ - - 'export %(env)s="$${%(env)s}"' % { - env: util.environment(s), - }, - 'echo "$${%s}"' % util.environment(s), - ], - }, + function(s) util.envSet(s), + publicSecrets + secretSecrets + ) + + std.map( + function(s) function(step) step { + settings +: { + script +: [ + + 'export %(env)s="$${%(env)s}"' % { + env: util.environment(s), + }, + 'echo "$${%s}"' % util.environment(s), + ], }, - publicSecrets + secretSecrets - ) + }, + publicSecrets + secretSecrets ) + ) ( images.ssh { name: 'deploy squid', diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index 1e516db..8b871c8 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -29,39 +29,6 @@ steps: commands: - sleep 15 -- name: will print ssh-host again - image: appleboy/drone-ssh - settings: - envs: - - drone_tag - - drone_commit - - drone_build_number - - drone_repo_name - - drone_repo_namespace - - ssh_host - - ssh_user - - ssh_root_user - host: - from_secret: ssh-host - password: - from_secret: ssh-password - port: - from_secret: ssh-port - script: - - rm afile - - "echo \"export SSH_HOST='$${SSH_HOST}'\" >> afile # \"ssh-host\"" - - "echo \"export SSH_USER='$${SSH_USER}'\" >> afile # \"ssh-user\"" - - "echo \"export SSH_ROOT_USER='$${SSH_ROOT_USER}'\" >> afile # \"ssh-root-user\"" - username: - from_secret: ssh-user - environment: - SSH_HOST: - from_secret: ssh-host - SSH_ROOT_USER: - from_secret: ssh-root-user - SSH_USER: - from_secret: ssh-user - - name: deploy squid image: appleboy/drone-ssh settings: