> ## Documentation Index
> Fetch the complete documentation index at: https://docs.porter.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Using other CI tools

> Deploy Porter applications from CircleCI, GitLab, Travis CI, or any CI tool using the Porter CLI Docker image and environment variables

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:

```
PORTER_TOKEN
PORTER_PROJECT
PORTER_CLUSTER

```

These environment variables can be set by logging into the Porter CLI and running `porter config`.

## Examples[](#examples "Direct link to heading")

### CircleCI[](#circleci "Direct link to heading")

It is easiest to create a [CircleCI Context](https://circleci.com/docs/2.0/contexts/) for each Porter cluster in order to set environment variables for a CircleCI job. In CircleCI, set the following environment variables in a context:

```
PORTER_TOKEN
PORTER_PROJECT
PORTER_CLUSTER
```

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:

```yaml theme={null}
version: 2.1

jobs:
  porter:
    docker:
      - image: ghcr.io/porter-dev/releases/porter-cli:latest
    steps:
      - checkout
      - setup_remote_docker:
          version: 19.03.13
      - run:
          name: "Update Porter application"
          command: "porter app update-tag <APP_NAME> --tag $CIRCLE_SHA1 --stream"

workflows:
  version: 2
  porter-staging-workflow:
    jobs:
      - porter:
          context: <CONTEXT_NAME>

```

Make sure to replace `<CONTEXT_NAME>` and `<APP_NAME>` with your actual CircleCI context name and application name.
