For Travis CI you can use project or user access tokens for authenticating your build with Depot.
A project access token can be injected into the Travis CI environment for
depot CLI authentication. This is a token that is tied to a specific project in your organization and not a user.
It is also possible to generate a user access token that can be injected into
the Travis CI environment for
depot CLI authentication. This is a token that is tied to a specific user and not a project. Therefore, it can be used to build all projects across all organizations that the user has access to.
To build a Docker image from Travis CI, you will need to set the
DEPOT_TOKEN environment variable in your repository settings. This can be done through the UI for your repository or via the Travis CLI:
travis env set DEPOT_TOKEN your-user-access-token
With your token set, you can now use the
depot CLI to build your Docker image:
sudo: required env: - DEPOT_INSTALL_DIR=/usr/local/bin before_install: - curl -L https://depot.dev/install-cli.sh | sudo sh script: - depot build --push --tag repo/image:tag .