2 ms·
Yes, you can definitely use this in your Bitbucket Pipelines. Our CLI is a drop in replacement for `docker build`. So in your pipeline you would still login to
by kylegalbraith 4y ago
Yes, you can definitely use this in your Bitbucket Pipelines. Our CLI is a drop in replacement for `docker build`. So in your pipeline you would still login to your registry with `docker login` but then you can use `depot build` with all of the same options you were using before and the build can be routed to our remote builders.
So your pipeline would effectively look like this.
image: node:10.15.0
pipelines:
default:
- step:
script:
- curl https://depot.dev/install-cli.sh | DEPOT_INSTALL_DIR=/usr/local/bin sh
- npm install
- npm test
- docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD
- depot build -t <my.container.registry.io>/<my_app>:<my_tag> . --push --project <DEPOT_PROJECT_ID> --token <DEPOT_PROJECT_TOKEN>
services:
- docker
Here I have used `--token` for passing in a project token to authenticate the build with your project in Depot. This can also be passed as an environment variable, `DEPOT_TOKEN`.
Edit: Formatting. Also thank you for pointing out this is an integration we are missing in our docs. We will get that added!
- xwowsersx 4y agoGreat, thanks for the thorough reply. Hope to test this out soon and see if we can't speed up our pipelines. Congrats on the launch.