refactored pipeline to use anchores
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Tobias Trabelsi 2022-04-23 18:25:53 +02:00
parent 641bd93f93
commit 66b678830e
Signed by: lerentis
GPG Key ID: FF0C2839718CAF2E
1 changed files with 237 additions and 475 deletions

View File

@ -7,175 +7,97 @@ platform:
os: linux os: linux
arch: amd64 arch: amd64
when_ressource: &WHEN_TEMPLATE_DEV
when:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
settings_template: &SETTINGS_TEMPLATE
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
steps: steps:
- name: build-ubuntu-22 - name: build-ubuntu-22
image: plugins/kaniko image: plugins/kaniko
settings: settings:
dockerfile: ubuntu-22.04/Dockerfile dockerfile: ubuntu-22.04/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- ubuntu-22.04-dev - ubuntu-22.04-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-20 - name: build-ubuntu-20
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: ubuntu-20.04/Dockerfile dockerfile: ubuntu-20.04/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- ubuntu-20.04-dev - ubuntu-20.04-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-18 - name: build-ubuntu-18
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: ubuntu-18.04/Dockerfile dockerfile: ubuntu-18.04/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- ubuntu-18.04-dev - ubuntu-18.04-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-16 - name: build-ubuntu-16
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: ubuntu-16.04/Dockerfile dockerfile: ubuntu-16.04/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- ubuntu-16.04-dev - ubuntu-16.04-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-14 - name: build-ubuntu-14
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: ubuntu-14.04/Dockerfile dockerfile: ubuntu-14.04/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- ubuntu-14.04-dev - ubuntu-14.04-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-8 - name: build-debian-8
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: debian-8/Dockerfile dockerfile: debian-8/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- debian-8-dev - debian-8-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-9 - name: build-debian-9
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: debian-9/Dockerfile dockerfile: debian-9/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- debian-9-dev - debian-9-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-10 - name: build-debian-10
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: debian-10/Dockerfile dockerfile: debian-10/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- debian-10-dev - debian-10-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
--- ---
kind: pipeline kind: pipeline
@ -186,133 +108,79 @@ platform:
os: linux os: linux
arch: amd64 arch: amd64
when_ressource: &WHEN_TEMPLATE_DEV
when:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
settings_template: &SETTINGS_TEMPLATE
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
steps: steps:
- name: build-fedora-34 - name: build-fedora-34
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: fedora-34/Dockerfile dockerfile: fedora-34/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- fedora-34-dev - fedora-34-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-fedora-35 - name: build-fedora-35
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: fedora-35/Dockerfile dockerfile: fedora-35/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- fedora-35-dev - fedora-35-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-fedora-36 - name: build-fedora-36
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: fedora-36/Dockerfile dockerfile: fedora-36/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- fedora-36-dev - fedora-36-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-fedora-37 - name: build-fedora-37
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: fedora-37/Dockerfile dockerfile: fedora-37/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- fedora-37-dev - fedora-37-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-almalinux-8 - name: build-almalinux-8
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: almalinux-8/Dockerfile dockerfile: almalinux-8/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- almalinux-8-dev - almalinux-8-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-centos-7 - name: build-centos-7
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: centos-7/Dockerfile dockerfile: centos-7/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- centos-7-dev - centos-7-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
--- ---
kind: pipeline kind: pipeline
@ -323,49 +191,43 @@ platform:
os: linux os: linux
arch: amd64 arch: amd64
when_ressource: &WHEN_TEMPLATE_DEV
when:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
settings_template: &SETTINGS_TEMPLATE
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
steps: steps:
- name: build-alpine-3-14 - name: build-alpine-3-14
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: alpine-3.14/Dockerfile dockerfile: alpine-3.14/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- alpine-3.14-dev - alpine-3.14-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-alpine-3-15 - name: build-alpine-3-15
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: alpine-3.15/Dockerfile dockerfile: alpine-3.15/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- alpine-3.15-dev - alpine-3.15-dev
when: <<: *WHEN_TEMPLATE_DEV
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
--- ---
kind: pipeline kind: pipeline
@ -376,29 +238,35 @@ platform:
os: linux os: linux
arch: amd64 arch: amd64
steps: when_ressource: &WHEN_TEMPLATE_DEV
- name: build-arch
image: plugins/kaniko:1.4.1
settings:
dockerfile: arch/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- arch-dev
when: when:
event: event:
- push - push
- pull_request - pull_request
- cron - cron
resources: resources:
limits: limits:
cpu: 200 cpu: 200
memory: 1024MiB memory: 1024MiB
settings_template: &SETTINGS_TEMPLATE
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
steps:
- name: build-arch
image: plugins/kaniko
settings:
dockerfile: arch/Dockerfile
<<: *SETTINGS_TEMPLATE
tags:
- arch-dev
<<: *WHEN_TEMPLATE_DEV
--- ---
kind: pipeline kind: pipeline
type: kubernetes type: kubernetes
@ -408,159 +276,95 @@ platform:
os: linux os: linux
arch: amd64 arch: amd64
when_ressource_tag: &WHEN_TEMPLATE_TAG
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
settings_template: &SETTINGS_TEMPLATE
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
steps: steps:
- name: build-ubuntu-22-release - name: build-ubuntu-22-release
image: plugins/kaniko image: plugins/kaniko
settings: settings:
dockerfile: ubuntu-22.04/Dockerfile dockerfile: ubuntu-22.04/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- ubuntu-22.04 - ubuntu-22.04
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-20-release - name: build-ubuntu-20-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: ubuntu-20.04/Dockerfile dockerfile: ubuntu-20.04/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- ubuntu-20.04 - ubuntu-20.04
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-18-release - name: build-ubuntu-18-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: ubuntu-18.04/Dockerfile dockerfile: ubuntu-18.04/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- ubuntu-18.04 - ubuntu-18.04
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-16-release - name: build-ubuntu-16-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: ubuntu-16.04/Dockerfile dockerfile: ubuntu-16.04/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- ubuntu-16.04 - ubuntu-16.04
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-14-release - name: build-ubuntu-14-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: ubuntu-14.04/Dockerfile dockerfile: ubuntu-14.04/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- ubuntu-14.04 - ubuntu-14.04
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-8-release - name: build-debian-8-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: debian-8/Dockerfile dockerfile: debian-8/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- debian-8 - debian-8
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-9-release - name: build-debian-9-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: debian-9/Dockerfile dockerfile: debian-9/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- debian-9 - debian-9
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-10-release - name: build-debian-10-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: debian-10/Dockerfile dockerfile: debian-10/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- debian-10 - debian-10
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
--- ---
kind: pipeline kind: pipeline
@ -571,122 +375,78 @@ platform:
os: linux os: linux
arch: amd64 arch: amd64
when_ressource_tag: &WHEN_TEMPLATE_TAG
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
settings_template: &SETTINGS_TEMPLATE
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
steps: steps:
- name: build-fedora-34-release - name: build-fedora-34-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: fedora-34/Dockerfile dockerfile: fedora-34/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- fedora-34 - fedora-34
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-fedora-35-release - name: build-fedora-35-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: fedora-35/Dockerfile dockerfile: fedora-35/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- fedora-35 - fedora-35
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-fedora-36-release - name: build-fedora-36-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: fedora-36/Dockerfile dockerfile: fedora-36/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- fedora-36 - fedora-36
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-fedora-37-release - name: build-fedora-37-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: fedora-37/Dockerfile dockerfile: fedora-37/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- fedora-37 - fedora-37
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-almalinux-8-release - name: build-almalinux-8-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: almalinux-8/Dockerfile dockerfile: almalinux-8/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- almalinux-8 - almalinux-8
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-centos-7-release - name: build-centos-7-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: centos-7/Dockerfile dockerfile: centos-7/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- centos-7 - centos-7
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
--- ---
kind: pipeline kind: pipeline
@ -697,51 +457,63 @@ platform:
os: linux os: linux
arch: amd64 arch: amd64
when_ressource_tag: &WHEN_TEMPLATE_TAG
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
settings_template: &SETTINGS_TEMPLATE
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
steps: steps:
- name: build-alpine-3.14-release - name: build-alpine-3.14-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: alpine-3.14/Dockerfile dockerfile: alpine-3.14/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- alpine-3.14 - alpine-3.14
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-alpine-3.15-release - name: build-alpine-3.15-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: alpine-3.15/Dockerfile dockerfile: alpine-3.15/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- alpine-3.15 - alpine-3.15
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
--- ---
kind: pipeline kind: pipeline
type: kubernetes type: kubernetes
name: release-arch name: release-arch
when_ressource_tag: &WHEN_TEMPLATE_TAG
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
settings_template: &SETTINGS_TEMPLATE
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
platform: platform:
os: linux os: linux
arch: amd64 arch: amd64
@ -749,23 +521,13 @@ platform:
steps: steps:
- name: build-arch-release - name: build-arch-release
image: plugins/kaniko:1.4.1 image: plugins/kaniko
settings: settings:
dockerfile: arch/Dockerfile dockerfile: arch/Dockerfile
password: <<: *SETTINGS_TEMPLATE
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags: tags:
- arch - arch
when: <<: *WHEN_TEMPLATE_TAG
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
--- ---
kind: pipeline kind: pipeline