add dockerhub auth for ci

This commit is contained in:
Robert Kaussow 2020-11-27 14:13:11 +01:00
parent 00f20c2814
commit d74d273a3d
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
2 changed files with 68 additions and 13 deletions

View File

@ -18,6 +18,7 @@ local PythonVersion(pyversion='3.5') = {
local PipelineLint = { local PipelineLint = {
kind: 'pipeline', kind: 'pipeline',
image_pull_secrets: ['docker_config'],
name: 'lint', name: 'lint',
platform: { platform: {
os: 'linux', os: 'linux',
@ -44,6 +45,7 @@ local PipelineLint = {
local PipelineTest = { local PipelineTest = {
kind: 'pipeline', kind: 'pipeline',
image_pull_secrets: ['docker_config'],
name: 'test', name: 'test',
platform: { platform: {
os: 'linux', os: 'linux',
@ -83,6 +85,7 @@ local PipelineTest = {
local PipelineSecurity = { local PipelineSecurity = {
kind: 'pipeline', kind: 'pipeline',
image_pull_secrets: ['docker_config'],
name: 'security', name: 'security',
platform: { platform: {
os: 'linux', os: 'linux',
@ -112,6 +115,7 @@ local PipelineSecurity = {
local PipelineBuildPackage = { local PipelineBuildPackage = {
kind: 'pipeline', kind: 'pipeline',
image_pull_secrets: ['docker_config'],
name: 'build-package', name: 'build-package',
platform: { platform: {
os: 'linux', os: 'linux',
@ -173,6 +177,7 @@ local PipelineBuildPackage = {
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',
@ -189,8 +194,9 @@ local PipelineBuildContainer(arch='amd64') = {
}, },
{ {
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}',
@ -204,8 +210,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',
@ -220,8 +227,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',
@ -246,6 +254,7 @@ local PipelineBuildContainer(arch='amd64') = {
local PipelineDocs = { local PipelineDocs = {
kind: 'pipeline', kind: 'pipeline',
image_pull_secrets: ['docker_config'],
name: 'docs', name: 'docs',
platform: { platform: {
os: 'linux', os: 'linux',
@ -354,6 +363,7 @@ local PipelineDocs = {
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

@ -16,6 +16,9 @@ steps:
environment: environment:
PY_COLORS: 1 PY_COLORS: 1
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -98,6 +101,9 @@ steps:
- python38-pytest - python38-pytest
- python39-pytest - python39-pytest
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -125,6 +131,9 @@ steps:
environment: environment:
PY_COLORS: 1 PY_COLORS: 1
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -183,6 +192,9 @@ steps:
ref: ref:
- refs/tags/** - refs/tags/**
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -208,8 +220,10 @@ steps:
- poetry build - poetry build
- 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:
@ -224,10 +238,12 @@ steps:
- build - build
- 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
@ -242,10 +258,12 @@ steps:
- dryrun - dryrun
- 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
@ -260,6 +278,9 @@ steps:
depends_on: depends_on:
- dryrun - dryrun
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -285,8 +306,10 @@ steps:
- poetry build - poetry build
- 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:
@ -301,10 +324,12 @@ steps:
- build - build
- 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
@ -319,10 +344,12 @@ steps:
- dryrun - dryrun
- 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
@ -337,6 +364,9 @@ steps:
depends_on: depends_on:
- dryrun - dryrun
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -362,8 +392,10 @@ steps:
- poetry build - poetry build
- 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:
@ -378,10 +410,12 @@ steps:
- build - build
- 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
@ -396,10 +430,12 @@ steps:
- dryrun - dryrun
- 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
@ -414,6 +450,9 @@ steps:
depends_on: depends_on:
- dryrun - dryrun
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -503,6 +542,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
@ -594,6 +636,9 @@ steps:
- success - success
- failure - failure
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -607,6 +652,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: fd70b6b2c63c8307c8653b9ca6bd264501e5237ffb22bcf0883f9eb327ee6f89 hmac: 75497b938ca5a161c125b510a28ddbf446bfa69bec13203b27af6dd4426f2902
... ...