How to deploy from a repository in bitbucket server?

1

I have a server with bitbucket server installed (a server of my own), we already created a repository with the application, however, now we need that the changes that occur in the repository are reflected in the application automatically. In another project we had git and through a post-receive hook an rsync of the repo was made to the application.

For bitbucket I saw in the documentation that it is necessary to write the hook itself with java, but it is not clear to me, where the hook is placed, as I invoke it, as I indicate which repository I want and to which folder they are going to copy the changes?

This link I found: link

Thank you very much for all your help. Greetings.

    
asked by Peter 03.03.2017 в 17:29
source

1 answer

0

I recommend you use Dandelion .

It's easy to install and you just have to edit dandelion.yml , which looks like the following:

adapter: sftp
host: example.com
username: user
password: pass
path: path/to/deployment

exclude:
    - .gitignore
    - dandelion.yml
    - dir/

additional:
    - config/auth.yml

Best of all, you can use it with repositories github or with bitbucket because it works with git.

And the deploy you do from the repository directory, as follows:

dandelion deploy

Note: css and js must be added in additional

additional:
  - css/app.min.css
  - javascripts/app.min.js
  - javascripts/init.min.js
    
answered by 03.03.2017 в 18:43