diff --git a/content/build/cloud/ci.md b/content/build/cloud/ci.md index f22eb77a0a..f4b235e737 100644 --- a/content/build/cloud/ci.md +++ b/content/build/cloud/ci.md @@ -309,6 +309,38 @@ pipeline { } ``` +{{< /tab >}} +{{< tab name="Travis CI" >}} + +```yaml +language: minimal +dist: jammy + +services: + - docker + +env: + global: + - IMAGE_NAME=username/repo + +before_install: | + echo "$DOCKER_PAT" | docker login --username "$DOCKER_USER" --password-stdin + +install: | + set -e + BUILDX_URL=$(curl -s https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-lab-releases.json | jq -r ".latest.assets[] | select(endswith(\"linux-$TRAVIS_CPU_ARCH\"))") + mkdir -vp ~/.docker/cli-plugins/ + curl --silent -L --output ~/.docker/cli-plugins/docker-buildx $BUILDX_URL + chmod a+x ~/.docker/cli-plugins/docker-buildx + docker buildx create --use --driver cloud "/default" + +script: | + docker buildx build \ + --platform linux/amd64,linux/arm64 \ + --push \ + --tag "$IMAGE_NAME" . +``` + {{< /tab >}} {{< tab name="BitBucket Pipelines" >}}