mirror of
https://github.com/thegeeklab/ansible-doctor.git
synced 2024-06-14 14:20:53 +02:00
publish to dockerhub and quay.io
This commit is contained in:
parent
32bfecee04
commit
c83233f345
|
@ -169,7 +169,7 @@ local PipelineBuildContainer(arch='amd64') = {
|
|||
settings: {
|
||||
dry_run: true,
|
||||
dockerfile: 'Dockerfile',
|
||||
repo: 'xoxys/ansible-doctor',
|
||||
repo: 'xoxys/${DRONE_REPO_NAME}',
|
||||
username: { from_secret: 'docker_username' },
|
||||
password: { from_secret: 'docker_password' },
|
||||
},
|
||||
|
@ -178,13 +178,13 @@ local PipelineBuildContainer(arch='amd64') = {
|
|||
},
|
||||
},
|
||||
{
|
||||
name: 'publish',
|
||||
name: 'publish-dockerhub',
|
||||
image: 'plugins/docker:18-linux-' + arch,
|
||||
settings: {
|
||||
auto_tag: true,
|
||||
auto_tag_suffix: arch,
|
||||
dockerfile: 'Dockerfile',
|
||||
repo: 'xoxys/ansible-doctor',
|
||||
repo: 'xoxys/${DRONE_REPO_NAME}',
|
||||
username: { from_secret: 'docker_username' },
|
||||
password: { from_secret: 'docker_password' },
|
||||
},
|
||||
|
@ -192,6 +192,21 @@ local PipelineBuildContainer(arch='amd64') = {
|
|||
ref: ['refs/heads/master', 'refs/tags/**'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'publish-quay',
|
||||
image: 'plugins/docker:18-linux-' + arch,
|
||||
settings: {
|
||||
auto_tag: true,
|
||||
auto_tag_suffix: arch,
|
||||
dockerfile: 'Dockerfile',
|
||||
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: [
|
||||
'security',
|
||||
|
@ -316,26 +331,59 @@ local PipelineNotifications = {
|
|||
},
|
||||
steps: [
|
||||
{
|
||||
image: 'plugins/manifest',
|
||||
image: 'plugins/manifest-dockerhub',
|
||||
name: 'manifest',
|
||||
settings: {
|
||||
ignore_missing: true,
|
||||
auto_tag: true,
|
||||
username: { from_secret: 'docker_username' },
|
||||
password: { from_secret: 'docker_password' },
|
||||
spec: 'manifest.tmpl',
|
||||
spec: 'docker/manifest.tmpl',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'readme',
|
||||
image: 'sheogorath/readme-to-dockerhub',
|
||||
image: 'plugins/manifest-quay',
|
||||
name: 'manifest',
|
||||
settings: {
|
||||
ignore_missing: true,
|
||||
auto_tag: true,
|
||||
username: { from_secret: 'quay_username' },
|
||||
password: { from_secret: 'quay_password' },
|
||||
spec: 'docker/manifest-quay.tmpl',
|
||||
},
|
||||
},
|
||||
{
|
||||
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-doctor',
|
||||
README_PATH: 'README.md',
|
||||
SHORT_DESCRIPTION: 'ansible-doctor - Simple annotation based documentation for your roles',
|
||||
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'],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
114
.drone.yml
114
.drone.yml
|
@ -188,14 +188,14 @@ steps:
|
|||
dry_run: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: xoxys/ansible-doctor
|
||||
repo: xoxys/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
ref:
|
||||
- refs/pull/**
|
||||
|
||||
- name: publish
|
||||
- name: publish-dockerhub
|
||||
image: plugins/docker:18-linux-amd64
|
||||
settings:
|
||||
auto_tag: true
|
||||
|
@ -203,7 +203,7 @@ steps:
|
|||
dockerfile: Dockerfile
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: xoxys/ansible-doctor
|
||||
repo: xoxys/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
|
@ -211,6 +211,22 @@ steps:
|
|||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
|
||||
- name: publish-quay
|
||||
image: plugins/docker:18-linux-amd64
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: amd64
|
||||
dockerfile: Dockerfile
|
||||
password:
|
||||
from_secret: quay_password
|
||||
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: quay_username
|
||||
when:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
|
@ -241,14 +257,14 @@ steps:
|
|||
dry_run: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: xoxys/ansible-doctor
|
||||
repo: xoxys/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
ref:
|
||||
- refs/pull/**
|
||||
|
||||
- name: publish
|
||||
- name: publish-dockerhub
|
||||
image: plugins/docker:18-linux-arm64
|
||||
settings:
|
||||
auto_tag: true
|
||||
|
@ -256,7 +272,7 @@ steps:
|
|||
dockerfile: Dockerfile
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: xoxys/ansible-doctor
|
||||
repo: xoxys/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
|
@ -264,6 +280,22 @@ steps:
|
|||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
|
||||
- name: publish-quay
|
||||
image: plugins/docker:18-linux-arm64
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: arm64
|
||||
dockerfile: Dockerfile
|
||||
password:
|
||||
from_secret: quay_password
|
||||
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: quay_username
|
||||
when:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
|
@ -294,14 +326,14 @@ steps:
|
|||
dry_run: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: xoxys/ansible-doctor
|
||||
repo: xoxys/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
ref:
|
||||
- refs/pull/**
|
||||
|
||||
- name: publish
|
||||
- name: publish-dockerhub
|
||||
image: plugins/docker:18-linux-arm
|
||||
settings:
|
||||
auto_tag: true
|
||||
|
@ -309,7 +341,7 @@ steps:
|
|||
dockerfile: Dockerfile
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: xoxys/ansible-doctor
|
||||
repo: xoxys/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
|
@ -317,6 +349,22 @@ steps:
|
|||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
|
||||
- name: publish-quay
|
||||
image: plugins/docker:18-linux-arm
|
||||
settings:
|
||||
auto_tag: true
|
||||
auto_tag_suffix: arm
|
||||
dockerfile: Dockerfile
|
||||
password:
|
||||
from_secret: quay_password
|
||||
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
||||
username:
|
||||
from_secret: quay_username
|
||||
when:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
|
@ -424,27 +472,53 @@ platform:
|
|||
|
||||
steps:
|
||||
- name: manifest
|
||||
image: plugins/manifest
|
||||
image: plugins/manifest-dockerhub
|
||||
settings:
|
||||
auto_tag: true
|
||||
ignore_missing: true
|
||||
password:
|
||||
from_secret: docker_password
|
||||
spec: manifest.tmpl
|
||||
spec: docker/manifest.tmpl
|
||||
username:
|
||||
from_secret: docker_username
|
||||
|
||||
- name: readme
|
||||
image: sheogorath/readme-to-dockerhub
|
||||
- name: manifest
|
||||
image: plugins/manifest-quay
|
||||
settings:
|
||||
auto_tag: true
|
||||
ignore_missing: true
|
||||
password:
|
||||
from_secret: quay_password
|
||||
spec: docker/manifest-quay.tmpl
|
||||
username:
|
||||
from_secret: quay_username
|
||||
|
||||
- name: pushrm-dockerhub
|
||||
pull: always
|
||||
image: chko/docker-pushrm:1
|
||||
environment:
|
||||
DOCKERHUB_PASSWORD:
|
||||
DOCKER_PASS:
|
||||
from_secret: docker_password
|
||||
DOCKERHUB_REPO_NAME: ansible-doctor
|
||||
DOCKERHUB_REPO_PREFIX: xoxys
|
||||
DOCKERHUB_USERNAME:
|
||||
DOCKER_USER:
|
||||
from_secret: docker_username
|
||||
README_PATH: README.md
|
||||
SHORT_DESCRIPTION: ansible-doctor - Simple annotation based documentation for your roles
|
||||
PUSHRM_FILE: README.md
|
||||
PUSHRM_SHORT: Rootless Alpine base image
|
||||
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
|
||||
|
@ -472,6 +546,6 @@ depends_on:
|
|||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 94878dbc24e00a84fb2f81709d2951d6bd5cb38eb5643bc4bb792495f3ab14c3
|
||||
hmac: fbd10736f616596f2243a740b9fea399a2f9fe752a9610fc4286adf2a5fa27d3
|
||||
|
||||
...
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# ansible-doctor
|
||||
|
||||
ansible-doctor - Simple annotation based documentation for your roles
|
||||
|
||||
[![Build Status](https://img.shields.io/drone/build/xoxys/ansible-doctor?logo=drone)](https://cloud.drone.io/xoxys/ansible-doctor)
|
||||
[![Docker Hub](https://img.shields.io/badge/docker-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/xoxys/ansible-doctor)
|
||||
[![Python Version](https://img.shields.io/pypi/pyversions/ansible-doctor.svg)](https://pypi.org/project/ansible-doctor/)
|
||||
|
|
24
docker/manifest-quay.tmpl
Normal file
24
docker/manifest-quay.tmpl
Normal file
|
@ -0,0 +1,24 @@
|
|||
image: quay.io/thegeeklab/ansible-doctor:{{#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-doctor:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
|
||||
- image: quay.io/thegeeklab/ansible-doctor:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm64
|
||||
platform:
|
||||
architecture: arm64
|
||||
os: linux
|
||||
variant: v8
|
||||
|
||||
- image: quay.io/thegeeklab/ansible-doctor:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm
|
||||
platform:
|
||||
architecture: arm
|
||||
os: linux
|
||||
variant: v7
|
Loading…
Reference in New Issue
Block a user