Using Other CI Tools
You can use other CI tools, such as CircleCI, Travis CI, or Gitlab, to deploy your application. These CI tools support running any Docker image as part of a CI workflow. Porter maintains ghcr.io/porter-dev/releases/porter-cli:latest
, a public Docker image that contains the Porter CLI. This allows you to run Porter CLI commands easily as part of any workflow.
The Porter CLI requires that the following environment variables are set in order to target a specific application:
These environment variables can be set by logging into the Porter CLI and running porter config
.
Examples
CircleCI
It is easiest to create a CircleCI Context for each Porter cluster in order to set environment variables for a CircleCI job. In CircleCI, set the following environment variables in a context:
These environment variables can be found after running porter config
from the Porter CLI. Next, you can create the following CircleCI config file to a desired branch of your repository:
Make sure to replace <CONTEXT_NAME>
and <APP_NAME>
with your actual CircleCI context name and application name.