Deployment management for Lets using git pull
git-pull deployment management for Lets. Basically provides the same functionality as capistrano.
See Lets for how to install lets.
npm install lets-git-pull
Create the following Letsfile.js:
var gitpull = require'lets-git-pull';// Create a stagevar stagename = letsStagehost: '18.104.22.168'username: 'username'password: 'asdasd'agent: processenvSSH_AUTH_SOCKagentForward: truerepository: 'email@example.com:letsjs/lets-git-pull.git'remotePath: '/var/lets/sitename';// Add your own instructions, like symlink to the server's folderstagenameon'deploy:publish'thisgetConnectioncexec'ln -nfs ' + optionscurrent + ' /var/www/site.com' done;;;// Deploy using git pullstagenameplugingitpull;// Add the stage to letsletsaddStage'stagename' stagename;;
Then run this in the terminal:
lets deploy:setup stagenamelets deploy:check stagenamelets deploy stagename
That's it! More examples will come later.
The following options may be used but not specific to this plugin, see lets-ssh for more information:
The url of the repository.
The path where the files will be put on the remote, without trailing slash.
options.branch = 'master'
The branch to checkout. Default is master.
options.keepRevisions = 5
How many revisions to keep on cleanup. Default is 5.
options.removeOldRevisionOnRollback = true
Whether or not to remove the old revision on rollback.
The absolute path to the folder where the current revision is stored. Available after
The absolute path to the symlink ([remotePath]/current) to the current revision. Use for e.g. symlinking the project to the webserver's public-html file. Available after
The absolute path to the folder where the old revision is stored when rolling back. Available after
See guidelines for lets.
Run tests using
grunt test or
make test. You need to set up your
own SSH-server to test against. On OS X a really simple way is to simply enable
Sharing->Remote Login (preferably on a for this purpose designated account).
However on OS X (and any other server which doesn't use GNU CLI tools) you also
need to install GNU find (using e.g.
brew install findutils --default-names),
since the tests use a flag (-printf) which the BSD version doesn't support.
When you have an SSH-server to test against, copy
config.js and enter its details.