Datica Deployment

This page documents deployments using the next major version dpl v2, which currently is in a beta release phase. Please see our blog post for details. The current default version is dpl v1. Check dpl v1 documentation here.

Be sure to read the v2 deployment overview.

Travis CI can automatically deploy to Datica after a successful build.

In order to setup a deployment you need to:

Find your Git remote #

Make sure your Datica environment is associated.

Get the git remote by running git remote -v from within the associated repository, and add it to your .travis.yml.

deploy:
  provider: datica
  target: ssh://git@git.catalyzeapps.com:2222/app1234.git

Set up the repository’s key as a deployment key on Datica #

Install the Travis CI command line client, and get the public SSH key for your Travis CI project and save it to a file by running:

travis pubkey > travis.pub

Add the key as a deploy key using the catalyze command line client within the associated repo. For example:

catalyze deploy-keys add travisci ./travis.pub your-service

Set up Datica as a known host on Travis CI #

List your known hosts by running cat ~/.ssh/known_hosts, and find and copy the line that includes the git remote found in Step 1.

It’ll look something like:

[git.catalyzeapps.com]:2222 ecdsa-sha2-nistp256 BBBB12abZmKlLXNo...

Update your before_deploy step in .travis.yml to update the known_hosts file:

before_deploy: echo "[git.catalyzeapps.com]:2222 ecdsa-sha2-nistp256 BBBB12abZmKlLXNo..." >> ~/.ssh/known_hosts

Specifying a directory to deploy #

To only deploy the build directory, for example, set path:

deploy:
  provider: catalyze
  # ⋮
  path: build

Pull Requests #

Note that pull request builds skip the deployment step altogether.

See also #