add dockerhub auth for ci

This commit is contained in:
Robert Kaussow 2020-11-27 14:13:10 +01:00
parent 34d7dc0f50
commit 206ce52b96
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',
@ -84,6 +86,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',
@ -113,6 +116,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',
@ -171,6 +175,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',
@ -186,8 +191,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}',
@ -201,8 +207,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',
@ -217,8 +224,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',
@ -243,6 +251,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',
@ -351,6 +360,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
@ -111,6 +114,9 @@ steps:
- python37-pytest - python37-pytest
- python38-pytest - python38-pytest
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -138,6 +144,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
@ -194,6 +203,9 @@ steps:
ref: ref:
- refs/tags/** - refs/tags/**
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -218,8 +230,10 @@ steps:
- python setup.py bdist_wheel - python setup.py bdist_wheel
- 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:
@ -234,10 +248,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
@ -252,10 +268,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
@ -270,6 +288,9 @@ steps:
depends_on: depends_on:
- dryrun - dryrun
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -294,8 +315,10 @@ steps:
- python setup.py bdist_wheel - python setup.py bdist_wheel
- 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:
@ -310,10 +333,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
@ -328,10 +353,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
@ -346,6 +373,9 @@ steps:
depends_on: depends_on:
- dryrun - dryrun
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -370,8 +400,10 @@ steps:
- python setup.py bdist_wheel - python setup.py bdist_wheel
- 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:
@ -386,10 +418,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
@ -404,10 +438,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
@ -422,6 +458,9 @@ steps:
depends_on: depends_on:
- dryrun - dryrun
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -511,6 +550,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
@ -604,6 +646,9 @@ steps:
- success - success
- failure - failure
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -617,6 +662,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: deb1e9385bfbdf528f4663dd0d9ed45c3c45c7d62a42a51156a8b2847352e230 hmac: ee188eafcf82509ebf2c7ea729e399d4ea0e52071e650835f7a1f49b0b3e5cc7
... ...