Skip to content

Instantly share code, notes, and snippets.

@samip5
Created February 19, 2023 04:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samip5/22f1487e7841a135ed7db74ba454380e to your computer and use it in GitHub Desktop.
Save samip5/22f1487e7841a135ed7db74ba454380e to your computer and use it in GitHub Desktop.
Create a multi-arch Drone pipelines using Docker in Docker
kind: pipeline
name: build-container-amd64
platform:
os: linux
arch: amd64
# Define the steps of the pipeline
steps:
- name: build-amd64
image: plugins/docker
settings:
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASSWORD
registry:
from_secret: REGISTRY
repo: git.<snip>.fi/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}
tags:
- latest-amd64
---
kind: pipeline
name: build-container-arm64
type: docker
platform:
os: linux
arch: arm64
steps:
- name: build-arm64
image: plugins/docker
settings:
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASSWORD
registry:
from_secret: REGISTRY
repo: git.<snip>.fi/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}
tags:
- latest-arm64
---
kind: pipeline
name: docker-manifest
clone:
disable: true
platform:
os: linux
arch: amd64
steps:
- name: manifest
image: plugins/manifest
pull: always
settings:
password:
from_secret: REGISTRY_PASSWORD
username:
from_secret: REGISTRY_USER
target: git.<snip>.fi/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}:${DRONE_COMMIT_SHA}
template: git.<snip>.fi/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}:latest-ARCH
platforms:
- linux/amd64
- linux/arm64
depends_on:
- build-container-arm64
- build-container-amd64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment