lucasmotta / dploy Goto Github PK
View Code? Open in Web Editor NEW⛔️ currently unmaintained ⛔️
Home Page: http://lucasmotta.github.io/dploy/
License: MIT License
⛔️ currently unmaintained ⛔️
Home Page: http://lucasmotta.github.io/dploy/
License: MIT License
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?
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 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.
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?
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!
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 ?
We need to check if the file already exists and append the script into the file.
We also need to check if it's already installed so we won't have duplicated code.
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?
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 ?
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."
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.
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:
Let me know which option you guys like or if there's any other.
No other files are touched.
dev:
scheme: sftp
# port: 21
host: •••••••••••
user: •••••••••••
pass: •••••••••••
check: true
path:
local: /www/clients/•••••••••••/hotsite/
remote: /home/•••••••••••/www/hotsite/
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 :)
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!
Figure out the best way to create those tests. If anyone has any suggestions, just post it here :)
Would be great if, as soon as a new file is uploaded to one of those servers, we invalidate (purge) this file so you don't have to do it manually.
Is it possible to upload only the contents of folder x to the remote folder?
So if I set the local folder to ./production/ it uploads only the contents from that folder to the remote folder set?
I don't want remote_path/production, I want the files from production to be at remote_path/*.
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
Any plans on making a grunt task for this? Would be great to be able to add this into my existing workflow.
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?
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.
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.
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?
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: /
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.
And why it's useful if you want to deploy from your commit message.
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
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?
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?
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.
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.
Would be cool to specify the output into a new folder in a directory. Upload fails for me if the output folder doesn't exist.
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.
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:
I can't re-upload files of current commit. .Rev file says that this commit already uploaded. What I'm doing:
Maybe .rev file needed to update after successful upload?
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.
I may have to change the structure of the .rev file, but I've to store the submodules commits somewhere.
Right now only FTP connections are supported.
An option to only upload the .rev file when the files are already on the server. Something like git ftp catchup, documentation.
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?
To prompt the user before uploading to the server, so first you see the list of files that will be uploaded/deleted.
Add a /
in the end of the paths if it's not been added.
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
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?
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!
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
Result : The files on the remote server are successful removed, but not the folder. It's leave empty !
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.
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.