test multiarch container build

This commit is contained in:
Robert Kaussow 2019-10-09 11:05:02 +02:00
parent 3fea05d13c
commit 4e68882cfe
3 changed files with 61 additions and 1 deletions

View File

@ -176,6 +176,7 @@ local PipelineBuildContainer(arch="amd64") = {
pull: "always", pull: "always",
settings: { settings: {
auto_tag: true, auto_tag: true,
auto_tag_suffix: arch,
dockerfile: "Dockerfile", dockerfile: "Dockerfile",
repo: "xoxys/ansible-doctor", repo: "xoxys/ansible-doctor",
username: { "from_secret": "docker_username" }, username: { "from_secret": "docker_username" },
@ -202,6 +203,24 @@ local PipelineNotifications = {
arch: "amd64", arch: "amd64",
}, },
steps: [ steps: [
{
image: "plugins/manifest",
name: "manifest",
pull: "always",
settings: {
ignore_missing: true,
auto_tag: true,
username: { from_secret: "docker_username" },
password: { from_secret: "docker_password" },
spec: "manifest.tmpl",
},
when: {
ref: [
'refs/heads/master',
'refs/tags/**',
],
},
},
{ {
name: "matrix", name: "matrix",
image: "plugins/matrix", image: "plugins/matrix",

View File

@ -195,6 +195,7 @@ steps:
image: plugins/docker:linux-amd64 image: plugins/docker:linux-amd64
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: amd64
dockerfile: Dockerfile dockerfile: Dockerfile
password: password:
from_secret: docker_password from_secret: docker_password
@ -247,6 +248,7 @@ steps:
image: plugins/docker:linux-arm64 image: plugins/docker:linux-arm64
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: arm64
dockerfile: Dockerfile dockerfile: Dockerfile
password: password:
from_secret: docker_password from_secret: docker_password
@ -299,6 +301,7 @@ steps:
image: plugins/docker:linux-arm image: plugins/docker:linux-arm
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: arm
dockerfile: Dockerfile dockerfile: Dockerfile
password: password:
from_secret: docker_password from_secret: docker_password
@ -328,6 +331,22 @@ platform:
arch: amd64 arch: amd64
steps: steps:
- name: manifest
pull: always
image: plugins/manifest
settings:
auto_tag: true
ignore_missing: true
password:
from_secret: docker_password
spec: manifest.tmpl
username:
from_secret: docker_username
when:
ref:
- refs/heads/master
- "refs/tags/**"
- name: matrix - name: matrix
image: plugins/matrix image: plugins/matrix
settings: settings:
@ -357,6 +376,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: 2db6ebb30be1f686e852ed208db770c956667f430738007d007380eaa81cab82 hmac: 0c78a7b118aa4b82673105054230952eaf9d17ff590bd3762396910f015e3b76
... ...

22
manifest.tmpl Normal file
View File

@ -0,0 +1,22 @@
image: xoxys/freshrss:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{ this }}
{{/each}}
{{/if}}
manifests:
- image: xoxys/freshrss:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-amd64
platform:
architecture: amd64
os: linux
- image: xoxys/freshrss:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm64
platform:
architecture: arm64
os: linux
- image: xoxys/freshrss:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm
platform:
architecture: arm
os: linux