Giter Site home page Giter Site logo

dploy's People

Contributors

abeestrada avatar cwspear avatar joncys avatar lucasmotta avatar ohwhen avatar straight-shoota avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dploy's Issues

Not uploading grunt generated files

For a current project we make heavy use of Grunt. I just tried to use dploy in this project and it works great except that it doesn't upload the generated grunt files.

Any solution?

Stash & Dploy hook

When I execute dploy explicitly from cli, it runs successfully and finishes. All works well. Command below:

dploy dev

However, when I commit like this:

commit -m "#dploy dev - Initial commit"
It gets stuck (wont accept any keyboard input) and I have to Ctrl+C to get out of it.

[ Wed Jun 11 2014 11:58:29 macbook as chris @ ami] git commit -m "#dploy dev"
Connecting to dev...
Checking revisions...
Checking diffs between [4361308e87183d8dfaf556da3182dd1095f58486] > [dd70f1cf70957e9e672cd371499fb4183a9d8b3b]
Files that will be uploaded:
[ ? ] .rev > public_html/ami/.rev
[ ? ] test.txt > public_html/ami/test.txt
[ ? ] .rev > public_html/ami/.rev
– Are you sure you want to upload those files? (Y/n)

^^ Gets stuck here and wont move forward, no keyboard input helps.

Its probably a very specific issue - had anyone experienced this or figured out a solution?

Add "allow_branches" parameter

Add another parameter to the gploy.yaml where you can set an array of branches that are allowed to deploy to that server.

That would help you to avoid accidental deploy to a live server for example.

Support for privateKey + passphrase?

When using SFTP with privateKey and publicKey, I get the following error message: "Error: Encrypted private key detected, but no passphrase given".

Is this a solvable error? I've tried looking for mention of a passphrase parameter, but couldn't find any.

Any suggestions?

Does .git need to be installed on the server?

This is just a question rather than an issue.

Does dploy require that the server be a git repository also? Typically I run git locally only and just files up via ftp. How does the dploy compare the local and remote versions?

Thanks!

Files exclude don't work

Hi every body :)

In my dploy.yaml, i would like exclude my app.php and my folder app. So, in my dploy, i've this :

exclude: ["app.php", "app"]

But he don't ignore :(

Any idea ?

Strategy for deploying from build directory without tracking it

Right now, I have a pretty basic folder structure for my app:

| myapp
    |--www
    |--deploy
    |--dploy.yaml
    |--buildfile

When I run a build process, it builds into the deploy folder, which I have also set in .gitignore. I have added www to the exclude array in dploy.yaml.

With this setup, DPLOY will only want to upload the .rev file and nothing else. Ideally, I would like to keep the deploy directory ignored as it adds a lot of weight to the repo if tracked. Is there a prescribed strategy for this type of situation?

accent issue

I'm a french user and I have some files with accent.
For exemple 'é' is identify as \303\251 and I cant dploy these files.
For exemple this stackStrace when I run a dploy :
"wp-content/uploads/2011/06/pr\303\251reg-2012-2013-150x150.jpg" > www/"wp-content/uploads/2011/06/pr\303\251reg-2012-2013-150x150.jpg"

Do you think it is possible to manage accent ?

Error creating revision file

Hi,

I'm integrating dploy to other projects now (works very well for my first project I used it for) but can't get it to work here. Everytime I run dploy it gives me "Error creating revision file."

Screenshot

When I manually login into the server with the same credentials using SFTP (with the App Transmit) I can make the .rev file, modify and delete it.

Add option to create a history of deployment

The idea is to create a .dploy-history folder with details of every deploy that is made.
This way you can track who, when and which commit was deployed to the server (sorted by date).

I can see that happening in two different ways:

option 1: create a single .history file with all the details inside

  • For every deployment, we add a new line to this file with the details of this deployment.
  • 👍 it's easier to compare and read
  • 👎 the file can get too big/heavy when you have loads of deploys. So it would take longer to load/save on the server.

option 2: create a file for each deploy

  • For every deployment, we create a new file containing the details of this deployment
  • 👍 faster to create/upload to the server
  • 👍 we can add more details of the deployment inside the file
  • 👎 it will create loads of files on the server

Let me know which option you guys like or if there's any other.

Dploy only uploads the .rev file

No other files are touched.

Config

dev:
    scheme: sftp
    # port: 21
    host: •••••••••••
    user: •••••••••••
    pass: •••••••••••
    check: true
    path:
        local: /www/clients/•••••••••••/hotsite/
        remote: /home/•••••••••••/www/hotsite/

Output

Connecting to dev...
Checking revisions...
Checking diffs...
Files that will be uploaded:
[ ? ] /www/clients/•••••••••/hotsites/.rev
Question: Are you sure you want to upload those files? (y/n):  y
[ + ] File uploaded: /www/clients/•••••••••/hotsites/.rev:
Upload completed for dev
All Completed :)

Diff

commit 49d2e1e2956e0142d317efabb5e2257b0a204c25
Author: •••••••••••••••••••
Date:   Wed Nov 20 17:11:21 2013 -0200

    hello dploy

diff --git a/index.html b/index.html
new file mode 100644
index 0000000..ddbe00a
--- /dev/null
+++ b/test.html
@@ -0,0 +1,2 @@
+<h1>Hello World!</h1>
+

um grande abraço!

Create test suit

Figure out the best way to create those tests. If anyone has any suggestions, just post it here :)

Multiple users deploying

Hello there,

I just discovered dploy and I love it. Unfortunately, since @julien731 started deploying on the same live server, I'm having issues deploying.

Instead of only showing the files that needs to be deployed, it shows me all files. Why is this happening? Is it possible to "catch up" with the latest changes/revisions?

Cheers

Grunt task

Any plans on making a grunt task for this? Would be great to be able to add this into my existing workflow.

Strange periodical error: Timed out while making data connection

If i upload with "slots" more than 1 (3 for example) in FTP mode, some time I see :

error: Timed out while making data connection

It happens for only one or two files in uploading files list.
How can I see server side answer/error of uploading this files?

SSH deployments

Are you interested in enhancing this with SSH deployments? Basically everything's the same, but you can define some commands, i.e. set it up to pull, and then build and run with grunt (or whatever the user wanted to configure).

I'm probably going to create it in my fork anyway, but was wondering if you were interested in that, or just wanted to focus on S/FTP.

Deploy fails: Error: EISDIR, read

The deploy starts out fine, but at some point it fails.

Config:

production:
    scheme: "ftp"
    host: "****"
    user: "***"
    pass: "****"
    path:
        local: "/"
        remote: "/*****/wp-content/*****/smart-people"
    exclude: ["deploy/*.yaml", "deploy/*.json", "deploy/path/**/*.js", "deploy/**/*.md"]

I get the following output after running dploy:

dploy
Connecting to warehouse...
Checking revisions...
Uploading files...
[ + ] File uploaded: admin/index.php:
[ + ] File uploaded: admin/metabox/fields.php:
[ + ] File uploaded: assets/css/index.php:
[ + ] File uploaded: assets/img/index.php:
[ + ] File uploaded: assets/js/index.php:
[ + ] File uploaded: assets/third-party/index.php:
[ + ] File uploaded: assets/third-party/plugin-updates/README.md:
[ + ] File uploaded: assets/third-party/plugin-updates/css/puc-debug-bar.css:
[ + ] File uploaded: assets/third-party/plugin-updates/debug-bar-panel.php:
[ + ] File uploaded: assets/third-party/plugin-updates/debug-bar-plugin.php:
[ + ] File uploaded: assets/third-party/plugin-updates/js/debug-bar.js:
[ + ] File uploaded: assets/third-party/plugin-updates/plugin-update-checker.php:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: EISDIR, read

I've tried running as root, changing the remote folder and deploying to a different server, but nothing seems to work.

Please help me!

Thanks.

Require explicit FTP over TLS

Some FTP servers have TLS/SSL enabled so even if I change my scheme to sftp it won't work, it fails to authenticate, and it hangs at connecting to my_server....

Maybe this feature can be implemented into the module, I've seen it before but it's beyond of my knowledge in order to submit a pull request.

What do you guys think?

Error creating revision

I'm getting the following error message when running $ dploy

Connecting to stage...
Checking revisions...

/usr/local/lib/node_modules/dploy/lib/deploy.js:321
   return console.log("Error creating revision file at:".red, ("" + revisionPa
                                                                    ^
ReferenceError: revisionPath is not defined
    at /usr/local/lib/node_modules/dploy/lib/deploy.js:321:80
    at fs.js:944:21
    at Object.oncomplete (fs.js:107:15)

My dploy.yaml looks like this:

stage:
    scheme: ftp
    host: ***
    port: 21
    user: ***
    pass: ***
    check: false
    path:
        local: build/
        remote: /

Deploy Bower components as well?

Is there any way to also deploy the Bower components (which I moved to another folder as another name, "assets/libs")? DPLOY seems to ignore it when deploying.

Debug option or how to debug?

Hey Hey
I am just trying to use dploy for my project. At first everything seems fine, but after several files, the deployment hangs without any error. Is there any debug option? How can I debug this? To be honest I am not familiar with node.js

"git diff" in checkDiff() fails on Windows running msysgit

Deploy.prototype.checkDiff always exits with an error and halts the entire process on Windows, running msysgit:

Connecting to dev..
Checking revisions.
Checking diffs...
This is not a valid .git repository. Error: Command failed: fatal: ambiguous arg
ument ''601b92f84948d5ed085237964f69304dc02431eb'': unknown revision or path not
in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

It seems that for some reason git diff does not accept commit hashes that are "stringified" by wrapping them in single quotes. I've removed the single quotes via simple String.replace and everything seems to work fine from there on. Don't know if this is platform (Windows) or implementation (msysgit) specific.

I'm not sure how will this affect *nix users, but maybe ditch the single quotes altogether?

sftp using public key

I am not real keen on putting my password in a config file, but I should be able to use public key encryption with SFTP. That doesnt seem to be working. If I specify a password using scheme: sftp, the dploy works, but if I remove the password, it says connecting and then eventually ends.

It looks like ssh2 module supports it.

Is using public key not supported, or am I missing the right way to do it?

Upload fails if folder already exists

I tried to update a project which had already been uploaded to the ftp server before manually. During the upload process dploy caught itself in an infinite loop.

This is caused by the fact that Deploy.checkBeforeUpload silently ignores the error that mkdir returns if a directory already exists. The file in question therefore stays in the upload queue and never gets uploaded.

As far as I can tell, this behavior regarding existing directories could easily be fixed by checking if the error message says "File exists" and if so, set the folder as created.
But it would probably be a good idea to react to other errors that could occur in this place too, to prevent dploy from running in a never ending loop.

Files Not Uploading to Respective Sub Directories

Not sure if this is a problem I've generated on my own or not. But when files are deployed they are deployed to the folder without subdirectories. Instead, the file names have been changed to the path name so example.png in the /img/ directory is uploaded to the root as imgexample.png.

This occurs whether those sub directories exist on the server or not. Terminal shows each file being uploaded using it's correct path ie
[ + ] File uploaded: img/example.png:

Not sure where the error occurs. Could be my server? This happens using both ftp and sftp.

path.local should match paths properly

For example:

    path:
        local: "dist/"

matches:

[ + ] File uploaded: client/bower_components/spin.js/dist/spin.js:
[ + ] File uploaded: client/bower_components/spin.js/dist/spin.min.js:
[ + ] File uploaded: dist/_font_init.html:
[ + ] File uploaded: dist/_footer.html:

but it should be only:

[ + ] File uploaded: dist/_font_init.html:
[ + ] File uploaded: dist/_footer.html:

Using "./dist" doesn't help with it.

Cancel uploading

Hi! At first, thanks for a great utility.

I make a suggestion which can add more functionality. Can you add the ability to abort uploading files?
When it's needed:

  • When I have problem with internet and some files from last commit doesn't uploaded
  • Wrong files are in uploading progress

I can't re-upload files of current commit. .Rev file says that this commit already uploaded. What I'm doing:

  • go to the FTP client
  • remove .rev file and upload all stuff again.

Maybe .rev file needed to update after successful upload?

Non Git Repositories.

You have almost made me a happy man !

But unfortunately this will not work for any other repos except git.

Would there be any chance that you might be able to get this to work on other repositories or perhaps with a strictly file system.
I am using mercurial, but a simple file system might be more beneficial.

Support git submodules

I may have to change the structure of the .rev file, but I've to store the submodules commits somewhere.

Issue with dot-prefixed filenames in excluded dirs

There seems to be a problem with some filenames beginning with a dot being added even though their parent dir is excluded.

As an example, I excluded the entire "wp-content" dir from a WordPress project using the following yaml config (only relevant bit shown):

check: true
exclude: ['wp-content/**']
path:
        local: 
        remote: "www/"

I also tried

check: true
exclude: ['wp-content/**/*']
path:
        local: 
        remote: "www/"

Everything gets excluded except the following Bower-installed files:

[ ? ] wp-content/themes/theme_name/bower_components/bootstrap/.bower.json > www/wp-content/themes/theme_name/bower_components/bootstrap/.bower.json
[ ? ] wp-content/themes/theme_name/bower_components/bootstrap/.gitignore > www/wp-content/themes/theme_name/bower_components/bootstrap/.gitignore
[ ? ] wp-content/themes/theme_name/bower_components/bootstrap/.travis.yml > www/wp-content/themes/theme_name/bower_components/bootstrap/.travis.yml
[ ? ] wp-content/themes/theme_name/bower_components/bootstrap/js/.jshintrc > www/wp-content/themes/theme_name/bower_components/bootstrap/js/.jshintrc
[ ? ] wp-content/themes/theme_name/bower_components/jquery/.bower.json > www/wp-content/themes/theme_name/bower_components/jquery/.bower.json
[ ? ] wp-content/themes/theme_name/bower_components/jquery/.editorconfig > www/wp-content/themes/theme_name/bower_components/jquery/.editorconfig
[ ? ] wp-content/themes/theme_name/bower_components/jquery/.gitattributes > www/wp-content/themes/theme_name/bower_components/jquery/.gitattributes
[ ? ] wp-content/themes/theme_name/bower_components/jquery/.gitignore > www/wp-content/themes/theme_name/bower_components/jquery/.gitignore
[ ? ] wp-content/themes/theme_name/bower_components/jquery/.gitmodules > www/wp-content/themes/theme_name/bower_components/jquery/.gitmodules
[ ? ] wp-content/themes/theme_name/bower_components/jquery/.jshintrc > www/wp-content/themes/theme_name/bower_components/jquery/.jshintrc
[ ? ] wp-content/themes/theme_name/bower_components/jquery/.mailmap > www/wp-content/themes/theme_name/bower_components/jquery/.mailmap
[ ? ] wp-content/themes/theme_name/bower_components/jquery/src/.jshintrc > www/wp-content/themes/theme_name/bower_components/jquery/src/.jshintrc
[ ? ] wp-content/themes/theme_name/bower_components/jquery/test/.jshintignore > www/wp-content/themes/theme_name/bower_components/jquery/test/.jshintignore
[ ? ] wp-content/themes/theme_name/bower_components/jquery/test/.jshintrc > www/wp-content/themes/theme_name/bower_components/jquery/test/.jshintrc

Am I missing something obvious or might there be a real issue behind this?

Add "secure" mode

To prompt the user before uploading to the server, so first you see the list of files that will be uploaded/deleted.

Stops in Checking revisions step

Hello

I´m trying to deploy a git project from my windows pc, and I'm getting:

Checking revisions...

And then, nothing.

I guess it could be the path to local repository, all the examples you have are made for linux or mac, I think, but what about windows, I'm using

C:\Users\luipalme\Documents\GitHub\nodejs

as local path. Can this be the problem?

thanks for reading

Issue on dploy

I have a php project, when I try to uploaded via dploy, the console says:

"connecting to dev...
Checking revisions..."

And then, nothing. It does nothing.

Does this dploy work with webservers with apache and php?

Execute from shell script

Hi!

I'm currently trying to automatically deploy my website using a post-commit hook.
Here is my script:

#!/bin/bash

set -x
terminal-notifier -message “Triggered” -title “post-commit”
cd /Users/pierrestoffe/Documents/Design\ \&\ Dev/Perso/Portfolio/Summer\ 2013/code
dploy
terminal-notifier -message “Finished” -title “post-commit”

The whole hook works just fine when I commit from the terminal but the "dploy" command does nothing when I'm committing from a git client (Gitbox.app or Github.app). The 'Finished' notification show though...

Would you have an idea why?
Thanks in advance!

ReferenceError: revisionPath is not defined

i'll get this error message in the OS X Mavericks shell

ReferenceError: revisionPath is not defined
at /usr/local/lib/node_modules/dploy/lib/deploy.js:321:80
at fs.js:944:21
at Object.oncomplete (fs.js:107:15)

any idea how to fix it and use dploy?

DONE — my fault

Remove the empty folders on the remote server

  1. I remove a folder and all his files
  2. I do my commit
  3. I use the "dploy" command

Result : The files on the remote server are successful removed, but not the folder. It's leave empty !

Add "before" and "after" commands

Implement two parameters on the gploy.yaml to execute any code before or after you deploy to the server.

That could be useful if you need to validate something before deploying - similar to the pre-commit and post-commit hooks from git.

Connection error

I'm not sure if this is the best place to leave this issue, but here it goes. I'm trying to set this up, but every time I run it I get:

Connecting to stage...
Connection failed.

I've successfully tested my connection through SSH. I've also tested with and without a password and privateKey. Unfortunately nothing seems to be working. Here's my code (except for the host name which I've changed for this posting):

stage:
scheme: sftp
host: ftps://myhost.com
port: 22
user: myusername
privateKey: ~/.ssh/id_rsa
check: true
path:
local: htdocs/
remote: staging/htdocs/

I've also tried:

stage:
scheme: sftp
host: ftps://myhost.com
port: 22
user: myusername
pass: mypassword
check: true
path:
local: htdocs/
remote: staging/htdocs/

Any help would be greatly appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.