add dockerhub auth for ci

This commit is contained in:
Robert Kaussow 2020-11-28 14:11:46 +01:00
parent 7ef254a07b
commit efde562a46
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
2 changed files with 52 additions and 13 deletions

View File

@ -1,5 +1,6 @@
local PipelineTest = { local PipelineTest = {
kind: 'pipeline', kind: 'pipeline',
image_pull_secrets: ['docker_config'],
name: 'test', name: 'test',
platform: { platform: {
os: 'linux', os: 'linux',
@ -28,6 +29,7 @@ local PipelineTest = {
local PipelineBuildContainer(arch='amd64') = { local PipelineBuildContainer(arch='amd64') = {
kind: 'pipeline', kind: 'pipeline',
image_pull_secrets: ['docker_config'],
name: 'build-container-' + arch, name: 'build-container-' + arch,
platform: { platform: {
os: 'linux', os: 'linux',
@ -36,8 +38,9 @@ local PipelineBuildContainer(arch='amd64') = {
steps: [ steps: [
{ {
name: 'dryrun', name: 'dryrun',
image: 'plugins/docker:18-linux-' + arch, image: 'plugins/docker:19',
settings: { settings: {
config: { from_secret: 'docker_config' },
dry_run: true, dry_run: true,
dockerfile: 'docker/Dockerfile', dockerfile: 'docker/Dockerfile',
repo: 'thegeeklab/${DRONE_REPO_NAME}', repo: 'thegeeklab/${DRONE_REPO_NAME}',
@ -50,8 +53,9 @@ local PipelineBuildContainer(arch='amd64') = {
}, },
{ {
name: 'publish-dockerhub', name: 'publish-dockerhub',
image: 'plugins/docker:18-linux-' + arch, image: 'plugins/docker:19',
settings: { settings: {
config: { from_secret: 'docker_config' },
auto_tag: true, auto_tag: true,
auto_tag_suffix: arch, auto_tag_suffix: arch,
dockerfile: 'docker/Dockerfile', dockerfile: 'docker/Dockerfile',
@ -65,8 +69,9 @@ local PipelineBuildContainer(arch='amd64') = {
}, },
{ {
name: 'publish-quay', name: 'publish-quay',
image: 'plugins/docker:18-linux-' + arch, image: 'plugins/docker:19',
settings: { settings: {
config: { from_secret: 'docker_config' },
auto_tag: true, auto_tag: true,
auto_tag_suffix: arch, auto_tag_suffix: arch,
dockerfile: 'docker/Dockerfile', dockerfile: 'docker/Dockerfile',
@ -90,6 +95,7 @@ local PipelineBuildContainer(arch='amd64') = {
local PipelineNotifications = { local PipelineNotifications = {
kind: 'pipeline', kind: 'pipeline',
image_pull_secrets: ['docker_config'],
name: 'notifications', name: 'notifications',
platform: { platform: {
os: 'linux', os: 'linux',

View File

@ -17,6 +17,9 @@ steps:
commands: commands:
- bats ./wait-for.bats - bats ./wait-for.bats
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -33,8 +36,10 @@ platform:
steps: steps:
- name: dryrun - name: dryrun
image: plugins/docker:18-linux-amd64 image: plugins/docker:19
settings: settings:
config:
from_secret: docker_config
dockerfile: docker/Dockerfile dockerfile: docker/Dockerfile
dry_run: true dry_run: true
password: password:
@ -47,10 +52,12 @@ steps:
- refs/pull/** - refs/pull/**
- name: publish-dockerhub - name: publish-dockerhub
image: plugins/docker:18-linux-amd64 image: plugins/docker:19
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: amd64 auto_tag_suffix: amd64
config:
from_secret: docker_config
dockerfile: docker/Dockerfile dockerfile: docker/Dockerfile
password: password:
from_secret: docker_password from_secret: docker_password
@ -63,10 +70,12 @@ steps:
- refs/tags/** - refs/tags/**
- name: publish-quay - name: publish-quay
image: plugins/docker:18-linux-amd64 image: plugins/docker:19
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: amd64 auto_tag_suffix: amd64
config:
from_secret: docker_config
dockerfile: docker/Dockerfile dockerfile: docker/Dockerfile
password: password:
from_secret: quay_password from_secret: quay_password
@ -79,6 +88,9 @@ steps:
- refs/heads/master - refs/heads/master
- refs/tags/** - refs/tags/**
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -98,8 +110,10 @@ platform:
steps: steps:
- name: dryrun - name: dryrun
image: plugins/docker:18-linux-arm64 image: plugins/docker:19
settings: settings:
config:
from_secret: docker_config
dockerfile: docker/Dockerfile dockerfile: docker/Dockerfile
dry_run: true dry_run: true
password: password:
@ -112,10 +126,12 @@ steps:
- refs/pull/** - refs/pull/**
- name: publish-dockerhub - name: publish-dockerhub
image: plugins/docker:18-linux-arm64 image: plugins/docker:19
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: arm64 auto_tag_suffix: arm64
config:
from_secret: docker_config
dockerfile: docker/Dockerfile dockerfile: docker/Dockerfile
password: password:
from_secret: docker_password from_secret: docker_password
@ -128,10 +144,12 @@ steps:
- refs/tags/** - refs/tags/**
- name: publish-quay - name: publish-quay
image: plugins/docker:18-linux-arm64 image: plugins/docker:19
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: arm64 auto_tag_suffix: arm64
config:
from_secret: docker_config
dockerfile: docker/Dockerfile dockerfile: docker/Dockerfile
password: password:
from_secret: quay_password from_secret: quay_password
@ -144,6 +162,9 @@ steps:
- refs/heads/master - refs/heads/master
- refs/tags/** - refs/tags/**
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -163,8 +184,10 @@ platform:
steps: steps:
- name: dryrun - name: dryrun
image: plugins/docker:18-linux-arm image: plugins/docker:19
settings: settings:
config:
from_secret: docker_config
dockerfile: docker/Dockerfile dockerfile: docker/Dockerfile
dry_run: true dry_run: true
password: password:
@ -177,10 +200,12 @@ steps:
- refs/pull/** - refs/pull/**
- name: publish-dockerhub - name: publish-dockerhub
image: plugins/docker:18-linux-arm image: plugins/docker:19
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: arm auto_tag_suffix: arm
config:
from_secret: docker_config
dockerfile: docker/Dockerfile dockerfile: docker/Dockerfile
password: password:
from_secret: docker_password from_secret: docker_password
@ -193,10 +218,12 @@ steps:
- refs/tags/** - refs/tags/**
- name: publish-quay - name: publish-quay
image: plugins/docker:18-linux-arm image: plugins/docker:19
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: arm auto_tag_suffix: arm
config:
from_secret: docker_config
dockerfile: docker/Dockerfile dockerfile: docker/Dockerfile
password: password:
from_secret: quay_password from_secret: quay_password
@ -209,6 +236,9 @@ steps:
- refs/heads/master - refs/heads/master
- refs/tags/** - refs/tags/**
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -299,6 +329,9 @@ steps:
- success - success
- failure - failure
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -314,6 +347,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: ed7dce0d14be5798a9e179b1561bda835b2ef28ef73dd537213c289fbd356800 hmac: 22c03cba1bdc4e88f031f2f0cc8b6bcc6c366a03c855318299a6c18805260d2e
... ...