mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-11-25 14:20:45 +00:00
publish images to dockerhub and quay
This commit is contained in:
parent
6d6bd4f3ca
commit
6b4ad1cbea
@ -188,29 +188,48 @@ local PipelineBuildContainer(arch='amd64') = {
|
||||
image: 'plugins/docker:18-linux-' + arch,
|
||||
settings: {
|
||||
dry_run: true,
|
||||
dockerfile: 'Dockerfile',
|
||||
repo: 'xoxys/ansible-later',
|
||||
dockerfile: 'docker/Dockerfile',
|
||||
repo: 'xoxys/${DRONE_REPO_NAME}',
|
||||
username: { from_secret: 'docker_username' },
|
||||
password: { from_secret: 'docker_password' },
|
||||
},
|
||||
depends_on: ['build'],
|
||||
when: {
|
||||
ref: ['refs/pull/**'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'publish',
|
||||
name: 'publish-dockerhub',
|
||||
image: 'plugins/docker:18-linux-' + arch,
|
||||
settings: {
|
||||
auto_tag: true,
|
||||
auto_tag_suffix: arch,
|
||||
dockerfile: 'Dockerfile',
|
||||
repo: 'xoxys/ansible-later',
|
||||
dockerfile: 'docker/Dockerfile',
|
||||
repo: 'xoxys/${DRONE_REPO_NAME}',
|
||||
username: { from_secret: 'docker_username' },
|
||||
password: { from_secret: 'docker_password' },
|
||||
},
|
||||
when: {
|
||||
ref: ['refs/heads/master', 'refs/tags/**'],
|
||||
},
|
||||
depends_on: ['dryrun'],
|
||||
},
|
||||
{
|
||||
name: 'publish-quay',
|
||||
image: 'plugins/docker:18-linux-' + arch,
|
||||
settings: {
|
||||
auto_tag: true,
|
||||
auto_tag_suffix: arch,
|
||||
dockerfile: 'docker/Dockerfile',
|
||||
registry: 'quay.io',
|
||||
repo: 'quay.io/thegeeklab/${DRONE_REPO_NAME}',
|
||||
username: { from_secret: 'quay_username' },
|
||||
password: { from_secret: 'quay_password' },
|
||||
},
|
||||
when: {
|
||||
ref: ['refs/heads/master', 'refs/tags/**'],
|
||||
},
|
||||
depends_on: ['dryrun'],
|
||||
},
|
||||
],
|
||||
depends_on: [
|
||||
@ -337,25 +356,64 @@ local PipelineNotifications = {
|
||||
steps: [
|
||||
{
|
||||
image: 'plugins/manifest',
|
||||
name: 'manifest',
|
||||
name: 'manifest-dockerhub',
|
||||
settings: {
|
||||
ignore_missing: true,
|
||||
auto_tag: true,
|
||||
username: { from_secret: 'docker_username' },
|
||||
password: { from_secret: 'docker_password' },
|
||||
spec: 'manifest.tmpl',
|
||||
spec: 'docker/manifest.tmpl',
|
||||
},
|
||||
when: {
|
||||
status: ['success'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'readme',
|
||||
image: 'sheogorath/readme-to-dockerhub',
|
||||
image: 'plugins/manifest',
|
||||
name: 'manifest-quay',
|
||||
settings: {
|
||||
ignore_missing: true,
|
||||
auto_tag: true,
|
||||
username: { from_secret: 'quay_username' },
|
||||
password: { from_secret: 'quay_password' },
|
||||
spec: 'docker/manifest-quay.tmpl',
|
||||
},
|
||||
when: {
|
||||
status: ['success'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'pushrm-dockerhub',
|
||||
pull: 'always',
|
||||
image: 'chko/docker-pushrm:1',
|
||||
environment: {
|
||||
DOCKERHUB_USERNAME: { from_secret: 'docker_username' },
|
||||
DOCKERHUB_PASSWORD: { from_secret: 'docker_password' },
|
||||
DOCKERHUB_REPO_PREFIX: 'xoxys',
|
||||
DOCKERHUB_REPO_NAME: 'ansible-later',
|
||||
README_PATH: 'README.md',
|
||||
SHORT_DESCRIPTION: 'ansible-later - Lovely automation testing framework',
|
||||
DOCKER_PASS: {
|
||||
from_secret: 'docker_password',
|
||||
},
|
||||
DOCKER_USER: {
|
||||
from_secret: 'docker_username',
|
||||
},
|
||||
PUSHRM_FILE: 'README.md',
|
||||
PUSHRM_SHORT: 'ansible-doctor - Simple annotation based documentation for your roles',
|
||||
PUSHRM_TARGET: 'xoxys/${DRONE_REPO_NAME}',
|
||||
},
|
||||
when: {
|
||||
status: ['success'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'pushrm-quay',
|
||||
pull: 'always',
|
||||
image: 'chko/docker-pushrm:1',
|
||||
environment: {
|
||||
APIKEY__QUAY_IO: {
|
||||
from_secret: 'quay_token',
|
||||
},
|
||||
PUSHRM_FILE: 'README.md',
|
||||
PUSHRM_TARGET: 'quay.io/thegeeklab/${DRONE_REPO_NAME}',
|
||||
},
|
||||
when: {
|
||||
status: ['success'],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -368,6 +426,9 @@ local PipelineNotifications = {
|
||||
username: { from_secret: 'matrix_username' },
|
||||
password: { from_secret: 'matrix_password' },
|
||||
},
|
||||
when: {
|
||||
status: ['success', 'failure'],
|
||||
},
|
||||
},
|
||||
],
|
||||
depends_on: [
|
||||
|
157
.drone.yml
157
.drone.yml
@ -207,32 +207,55 @@ steps:
|
||||
- name: dryrun
|
||||
image: plugins/docker:18-linux-amd64
|
||||
settings:
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: docker/Dockerfile
|
||||
dry_run: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: xoxys/ansible-later
|
||||
repo: xoxys/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
ref:
|
||||
- refs/pull/**
|
||||
depends_on:
|
||||
- build
|
||||
|
||||
- name: publish
|
||||
- name: publish-dockerhub
|
||||
image: plugins/docker:18-linux-amd64
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: amd64
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: docker/Dockerfile
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: xoxys/ansible-later
|
||||
repo: xoxys/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
depends_on:
|
||||
- dryrun
|
||||
|
||||
- name: publish-quay
|
||||
image: plugins/docker:18-linux-amd64
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: amd64
|
||||
dockerfile: docker/Dockerfile
|
||||
password:
|
||||
from_secret: quay_password
|
||||
registry: quay.io
|
||||
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: quay_username
|
||||
when:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
depends_on:
|
||||
- dryrun
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
@ -260,32 +283,55 @@ steps:
|
||||
- name: dryrun
|
||||
image: plugins/docker:18-linux-arm64
|
||||
settings:
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: docker/Dockerfile
|
||||
dry_run: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: xoxys/ansible-later
|
||||
repo: xoxys/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
ref:
|
||||
- refs/pull/**
|
||||
depends_on:
|
||||
- build
|
||||
|
||||
- name: publish
|
||||
- name: publish-dockerhub
|
||||
image: plugins/docker:18-linux-arm64
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: arm64
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: docker/Dockerfile
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: xoxys/ansible-later
|
||||
repo: xoxys/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
depends_on:
|
||||
- dryrun
|
||||
|
||||
- name: publish-quay
|
||||
image: plugins/docker:18-linux-arm64
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: arm64
|
||||
dockerfile: docker/Dockerfile
|
||||
password:
|
||||
from_secret: quay_password
|
||||
registry: quay.io
|
||||
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: quay_username
|
||||
when:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
depends_on:
|
||||
- dryrun
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
@ -313,32 +359,55 @@ steps:
|
||||
- name: dryrun
|
||||
image: plugins/docker:18-linux-arm
|
||||
settings:
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: docker/Dockerfile
|
||||
dry_run: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: xoxys/ansible-later
|
||||
repo: xoxys/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
ref:
|
||||
- refs/pull/**
|
||||
depends_on:
|
||||
- build
|
||||
|
||||
- name: publish
|
||||
- name: publish-dockerhub
|
||||
image: plugins/docker:18-linux-arm
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: arm
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: docker/Dockerfile
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: xoxys/ansible-later
|
||||
repo: xoxys/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
depends_on:
|
||||
- dryrun
|
||||
|
||||
- name: publish-quay
|
||||
image: plugins/docker:18-linux-arm
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: arm
|
||||
dockerfile: docker/Dockerfile
|
||||
password:
|
||||
from_secret: quay_password
|
||||
registry: quay.io
|
||||
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: quay_username
|
||||
when:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
depends_on:
|
||||
- dryrun
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
@ -446,28 +515,60 @@ platform:
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: manifest
|
||||
- name: manifest-dockerhub
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
auto_tag: true
|
||||
ignore_missing: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
spec: manifest.tmpl
|
||||
spec: docker/manifest.tmpl
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
|
||||
- name: readme
|
||||
image: sheogorath/readme-to-dockerhub
|
||||
- name: manifest-quay
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
auto_tag: true
|
||||
ignore_missing: true
|
||||
password:
|
||||
from_secret: quay_password
|
||||
spec: docker/manifest-quay.tmpl
|
||||
username:
|
||||
from_secret: quay_username
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
|
||||
- name: pushrm-dockerhub
|
||||
pull: always
|
||||
image: chko/docker-pushrm:1
|
||||
environment:
|
||||
DOCKERHUB_PASSWORD:
|
||||
DOCKER_PASS:
|
||||
from_secret: docker_password
|
||||
DOCKERHUB_REPO_NAME: ansible-later
|
||||
DOCKERHUB_REPO_PREFIX: xoxys
|
||||
DOCKERHUB_USERNAME:
|
||||
DOCKER_USER:
|
||||
from_secret: docker_username
|
||||
README_PATH: README.md
|
||||
SHORT_DESCRIPTION: ansible-later - Lovely automation testing framework
|
||||
PUSHRM_FILE: README.md
|
||||
PUSHRM_SHORT: ansible-doctor - Simple annotation based documentation for your roles
|
||||
PUSHRM_TARGET: xoxys/${DRONE_REPO_NAME}
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
|
||||
- name: pushrm-quay
|
||||
pull: always
|
||||
image: chko/docker-pushrm:1
|
||||
environment:
|
||||
APIKEY__QUAY_IO:
|
||||
from_secret: quay_token
|
||||
PUSHRM_FILE: README.md
|
||||
PUSHRM_TARGET: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
|
||||
- name: matrix
|
||||
image: plugins/matrix
|
||||
@ -481,6 +582,10 @@ steps:
|
||||
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
|
||||
username:
|
||||
from_secret: matrix_username
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
@ -495,6 +600,6 @@ depends_on:
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 759a975b796218d54d4e86f436810ec120bd53a5fa0abadf774467a35039bcd9
|
||||
hmac: 9952ea94d9d4d8a7bb8854423d59e5d94af8c16aeb76fa28e01c9049fe13f950
|
||||
|
||||
...
|
||||
|
@ -1,2 +1,3 @@
|
||||
- INTERNAL
|
||||
- upgrade CI pipeline to use Hugo v0.74.3
|
||||
- publish to dockerhub and quay.io
|
||||
|
@ -6,7 +6,7 @@ __license__ = "MIT"
|
||||
__maintainer__ = "Robert Kaussow"
|
||||
__email__ = "mail@geeklabor.de"
|
||||
__url__ = "https://github.com/xoxys/ansible-later"
|
||||
__version__ = "0.3.6"
|
||||
__version__ = "0.3.7"
|
||||
|
||||
from ansiblelater import logger
|
||||
|
||||
|
24
docker/manifest-quay.tmpl
Normal file
24
docker/manifest-quay.tmpl
Normal file
@ -0,0 +1,24 @@
|
||||
image: quay.io/thegeeklab/ansible-later:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||
{{#if build.tags}}
|
||||
tags:
|
||||
{{#each build.tags}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
manifests:
|
||||
- image: quay.io/thegeeklab/ansible-later:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
|
||||
- image: quay.io/thegeeklab/ansible-later:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm64
|
||||
platform:
|
||||
architecture: arm64
|
||||
os: linux
|
||||
variant: v8
|
||||
|
||||
- image: quay.io/thegeeklab/ansible-later:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm
|
||||
platform:
|
||||
architecture: arm
|
||||
os: linux
|
||||
variant: v7
|
Loading…
Reference in New Issue
Block a user