Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot upload two times to the same server #61

Open
amarchen opened this issue Oct 1, 2014 · 0 comments
Open

Cannot upload two times to the same server #61

amarchen opened this issue Oct 1, 2014 · 0 comments

Comments

@amarchen
Copy link

amarchen commented Oct 1, 2014

Hi there

I want to execute sftp-deploy two times: once for deploying the client side code (dist->webdir) and one for backend (backend->backend). Both things go to the same server, but two different directories. It seems that only the first call to sftp-deploy proceeds fine, the second one.. copies nothing.

From command line both grunt sftp-deploy:build and grunt sftp-deploy:build run just fine
In the composed task only first one is executed fine (in this case it's "build" one):
grunt.registerTask('deploy-to-production', [ 'sftp-deploy:build', 'sftp-deploy:backend' ]);

Here's my task definition:

'sftp-deploy': {
      'backend': {
        auth: {
          host: 'myserver.com',
          port: 22,
          authKey: myserver.com'
        },
        src: '<%= yeoman.backend %>',
        dest: '/home/myproject/backend',
        serverSep: '/',
        concurrency: 4,
        progress: true
      },
      'build': {
        auth: {
          host: 'myserver.com',
          port: 22,
          authKey: 'myserver.com'
        },
        src: '<%= yeoman.dist %>',
        dest: '/home/myproject/myserver.com',
        serverSep: '/',
        concurrency: 4,
        progress: true
      }
    }

And here's what I get for the second task if I try running grunt deploy-to-production --verbose:

...first deployment that is fine..
  transferred=[33/33] elapsed=[7.8s] overall=[100%] eta=[0.0s] [========================================]
>> Transferred : 0.59765625 Mb

Running "sftp-deploy:backend" (sftp-deploy) task
Verifying property sftp-deploy.backend exists in config...OK
Files: backend -> /home/myproject/backend
Reading .ftppass...OK
>> Logging in with key at /Users/artem/.ssh/id_rsa
>> Concurrency : 4
Connection :: end undefined
SFTP :: SFTP session closed undefined
SFTP :: close undefined
>> Transferred : 0 Mb
Connection :: close false
Connection :: close false

Done, without errors.

P.S.
It is somewhat similar to #19 , but there it was about hanging, in my case second execution is silently ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant