appleboy / drone-scp

Copy files and artifacts via SSH using a binary, docker or Drone CI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Templates not evaluating

josegomezr opened this issue · comments

According to DroneCI Docs on Drone-SCP its possible to use templates.

Nevertheless, those aren't evaluated at all. For example your Plugin Drone-Telegram have those too, and they evaluate just perfectly.

It'll be great to have them working for parameters like target, username or key.

Example

pipeline:
  build:
    image: node:alpine
    commands:
      - npm install
      - npm run build

  deploy_scp:
    image: appleboy/drone-scp
    host: deploy.host
    target: /var/www/deploy/{{repo.owner}}/{{repo.name}}
    source: ./public
    rm: true
    username: deploy
    password: deploy

Will create a folder called (literally) /var/www/deploy/{{repo.owner}}/{{repo.name}}.

Hi @josegomezr

You can try the following config.

target: /var/www/deploy/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}

ref: http://readme.drone.io/usage/environment-reference/

I close this issue now. Please feel free to reopen the issue if you have the same problem.

Could you provide an example in the documentation:
http://plugins.drone.io/appleboy/drone-scp/

@cyberb

I will update it.

Thanks!