appleboy / drone-scp

Copy files and artifacts via SSH using a binary, docker or Drone CI.
MIT License
142 stars 29 forks source link

wildcard pattern of source list copy errors using drone cron #118

Closed SaneHe closed 2 years ago

SaneHe commented 3 years ago

one pipeline, same buids 1、 test server scp conf

- name: test
  image: appleboy/drone-scp
  settings:
    host:
      from_secret: test-host
    username:
      from_secret: test-user
    key:
      from_secret: test-ssh
    port:
      from_secret: test-port
    command_timeout: 5m
    target: 
      - /data/www/sane/
    source:
      - ./dist/*
  when:
    status: [success]
    event:
    - push
    branch:
    - test

2、preview server scp conf

- name: qa
  image: appleboy/drone-scp
  settings:
    host:
      from_secret: preview-host
    username:
      from_secret: preview-user
    key:
      from_secret: preview-ssh
    port:
      from_secret: preview-port
    command_timeout: 5m
    target: 
      - /data/www/sane/
    source:
      - ./dist/*
  when:
    status: [success]
    event:
    - cron

result

test server image

preview server image

crone trigger wrong?

jlynet commented 3 years ago

Can your files be uploaded to the designated remote?

SaneHe commented 3 years ago

@ai930 yes, sure; I just want to copy builed files; The content of the file is correct trigger by push; The content of the file is wrongtrigger by cron;

jlynet commented 3 years ago

Is the file pointed to by this source the path of the host where I installed Docker?