Core
PaaS v2.x
2

Continuous deployment #

A CI/CD pipeline can deploy a new application version to Kuzzle PaaS by pushing a Docker image and calling the public application deployment API.

Requirements #

  • A Kuzzle PaaS project and environment.
  • A Docker image available in the project container registry.
  • A Kuzzle API token allowed to deploy applications in the target project.
  • Access to private packages if your build installs licensed Kuzzle packages. See Access private packages.

Deployment call #

Use the application:deploy action:

await kuzzle.query({
  controller: 'application',
  action: 'deploy',
  projectId: 'paas-project-my-project',
  environmentId: 'production',
  applicationId: 'api',
  body: {
    image: {
      name: 'harbor.paas.kuzzle.io/my-project/api',
      tag: '1.2.3'
    }
  }
});

Equivalent HTTP route:

POST /projects/:projectId/environments/:environmentId/applications/:applicationId/_deploy

See Applications API for the full endpoint reference.

GitHub Actions #

The Kuzzle application template contains an example workflow:

template-kiotp-project deploy workflow

Other CI/CD systems follow the same flow:

  1. Install dependencies.
  2. Build and test the application.
  3. Build the Docker image.
  4. Push the image to the project registry.
  5. Call application:deploy with the pushed image name and tag.

Community #