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/_deploySee 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:
- Install dependencies.
- Build and test the application.
- Build the Docker image.
- Push the image to the project registry.
- Call
application:deploywith the pushed image name and tag.