CD: Add docker image manifest
This commit is contained in:
parent
db8a42eebf
commit
f707954bd0
22
.drone-manifest.yml
Normal file
22
.drone-manifest.yml
Normal file
@ -0,0 +1,22 @@
|
||||
image: nemunaire/youp0m:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||
{{#if build.tags}}
|
||||
tags:
|
||||
{{#each build.tags}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
manifests:
|
||||
- image: nemunaire/youp0m:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
- image: nemunaire/youp0m:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
|
||||
platform:
|
||||
architecture: arm64
|
||||
os: linux
|
||||
variant: v8
|
||||
- image: nemunaire/youp0m:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
|
||||
platform:
|
||||
architecture: arm
|
||||
os: linux
|
||||
variant: v7
|
62
.drone.yml
62
.drone.yml
@ -1,7 +1,7 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: linux-arm64
|
||||
name: build-arm64
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
@ -32,7 +32,38 @@ steps:
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: linux-arm
|
||||
name: build-amd64
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- apk --no-cache add git go-bindata
|
||||
- go generate -v
|
||||
- go get -v -d
|
||||
- go build -v -o youp0m
|
||||
- wget -O Dockerfile https://ankh.serekh.nemunai.re/local/Dockerfile-youp0m
|
||||
- wget -O entrypoint.sh https://ankh.serekh.nemunai.re/local/entrypoint.sh-youp0m && chmod +x entrypoint.sh
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: nemunaire/youp0m
|
||||
auto_tag: true
|
||||
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: build-arm
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
@ -59,3 +90,30 @@ steps:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: docker-manifest
|
||||
|
||||
steps:
|
||||
- name: publish
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
auto_tag: true
|
||||
ignore_missing: true
|
||||
spec: .drone-manifest.yml
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- cron
|
||||
- push
|
||||
- tag
|
||||
|
||||
depends_on:
|
||||
- build-arm
|
||||
- build-arm64
|
||||
- build-amd64
|
||||
|
Loading…
Reference in New Issue
Block a user