Created
February 19, 2023 04:16
-
-
Save samip5/22f1487e7841a135ed7db74ba454380e to your computer and use it in GitHub Desktop.
Create a multi-arch Drone pipelines using Docker in Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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