From d33f66eaa03b19465a74b7327f9ad34b5aa335fa Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Fri, 27 Nov 2020 14:13:11 +0100 Subject: [PATCH] add dockerhub auth for ci --- .drone.jsonnet | 14 ++++++++++--- .drone.yml | 56 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 57 insertions(+), 13 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index c6646cc..11c11b7 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -18,6 +18,7 @@ local PythonVersion(pyversion='3.5') = { local PipelineLint = { kind: 'pipeline', + image_pull_secrets: ['docker_config'], name: 'lint', platform: { os: 'linux', @@ -45,6 +46,7 @@ local PipelineLint = { local PipelineTest = { kind: 'pipeline', + image_pull_secrets: ['docker_config'], name: 'test', platform: { os: 'linux', @@ -67,6 +69,7 @@ local PipelineTest = { local PipelineSecurity = { kind: 'pipeline', + image_pull_secrets: ['docker_config'], name: 'security', platform: { os: 'linux', @@ -97,6 +100,7 @@ local PipelineSecurity = { local PipelineBuildPackage = { kind: 'pipeline', + image_pull_secrets: ['docker_config'], name: 'build-package', platform: { os: 'linux', @@ -155,6 +159,7 @@ local PipelineBuildPackage = { local PipelineBuildContainer(arch='amd64') = { kind: 'pipeline', + image_pull_secrets: ['docker_config'], name: 'build-container-' + arch, platform: { os: 'linux', @@ -171,7 +176,7 @@ local PipelineBuildContainer(arch='amd64') = { }, { name: 'dryrun', - image: 'plugins/docker:18-linux-' + arch, + image: 'plugins/docker:19', pull: 'always', settings: { dry_run: true, @@ -187,8 +192,9 @@ local PipelineBuildContainer(arch='amd64') = { }, { name: 'publish-dockerhub', - image: 'plugins/docker:18-linux-' + arch, + image: 'plugins/docker:19', settings: { + config: { from_secret: 'docker_config' }, auto_tag: true, auto_tag_suffix: arch, dockerfile: 'docker/Dockerfile', @@ -203,8 +209,9 @@ local PipelineBuildContainer(arch='amd64') = { }, { name: 'publish-quay', - image: 'plugins/docker:18-linux-' + arch, + image: 'plugins/docker:19', settings: { + config: { from_secret: 'docker_config' }, auto_tag: true, auto_tag_suffix: arch, dockerfile: 'docker/Dockerfile', @@ -229,6 +236,7 @@ local PipelineBuildContainer(arch='amd64') = { local PipelineNotifications = { kind: 'pipeline', + image_pull_secrets: ['docker_config'], name: 'notifications', platform: { os: 'linux', diff --git a/.drone.yml b/.drone.yml index 8d9dc7e..d37d28b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -17,6 +17,9 @@ steps: environment: PY_COLORS: 1 +image_pull_secrets: +- docker_config + trigger: ref: - refs/heads/master @@ -97,6 +100,9 @@ steps: depends_on: - clone +image_pull_secrets: +- docker_config + trigger: ref: - refs/heads/master @@ -125,6 +131,9 @@ steps: environment: PY_COLORS: 1 +image_pull_secrets: +- docker_config + trigger: ref: - refs/heads/master @@ -181,6 +190,9 @@ steps: ref: - refs/tags/** +image_pull_secrets: +- docker_config + trigger: ref: - refs/heads/master @@ -207,7 +219,7 @@ steps: - name: dryrun pull: always - image: plugins/docker:18-linux-amd64 + image: plugins/docker:19 settings: dockerfile: docker/Dockerfile dry_run: true @@ -223,10 +235,12 @@ steps: - build - name: publish-dockerhub - image: plugins/docker:18-linux-amd64 + image: plugins/docker:19 settings: auto_tag: true auto_tag_suffix: amd64 + config: + from_secret: docker_config dockerfile: docker/Dockerfile password: from_secret: docker_password @@ -241,10 +255,12 @@ steps: - dryrun - name: publish-quay - image: plugins/docker:18-linux-amd64 + image: plugins/docker:19 settings: auto_tag: true auto_tag_suffix: amd64 + config: + from_secret: docker_config dockerfile: docker/Dockerfile password: from_secret: quay_password @@ -259,6 +275,9 @@ steps: depends_on: - dryrun +image_pull_secrets: +- docker_config + trigger: ref: - refs/heads/master @@ -285,7 +304,7 @@ steps: - name: dryrun pull: always - image: plugins/docker:18-linux-arm64 + image: plugins/docker:19 settings: dockerfile: docker/Dockerfile dry_run: true @@ -301,10 +320,12 @@ steps: - build - name: publish-dockerhub - image: plugins/docker:18-linux-arm64 + image: plugins/docker:19 settings: auto_tag: true auto_tag_suffix: arm64 + config: + from_secret: docker_config dockerfile: docker/Dockerfile password: from_secret: docker_password @@ -319,10 +340,12 @@ steps: - dryrun - name: publish-quay - image: plugins/docker:18-linux-arm64 + image: plugins/docker:19 settings: auto_tag: true auto_tag_suffix: arm64 + config: + from_secret: docker_config dockerfile: docker/Dockerfile password: from_secret: quay_password @@ -337,6 +360,9 @@ steps: depends_on: - dryrun +image_pull_secrets: +- docker_config + trigger: ref: - refs/heads/master @@ -363,7 +389,7 @@ steps: - name: dryrun pull: always - image: plugins/docker:18-linux-arm + image: plugins/docker:19 settings: dockerfile: docker/Dockerfile dry_run: true @@ -379,10 +405,12 @@ steps: - build - name: publish-dockerhub - image: plugins/docker:18-linux-arm + image: plugins/docker:19 settings: auto_tag: true auto_tag_suffix: arm + config: + from_secret: docker_config dockerfile: docker/Dockerfile password: from_secret: docker_password @@ -397,10 +425,12 @@ steps: - dryrun - name: publish-quay - image: plugins/docker:18-linux-arm + image: plugins/docker:19 settings: auto_tag: true auto_tag_suffix: arm + config: + from_secret: docker_config dockerfile: docker/Dockerfile password: from_secret: quay_password @@ -415,6 +445,9 @@ steps: depends_on: - dryrun +image_pull_secrets: +- docker_config + trigger: ref: - refs/heads/master @@ -503,6 +536,9 @@ steps: - success - failure +image_pull_secrets: +- docker_config + trigger: ref: - refs/heads/master @@ -519,6 +555,6 @@ depends_on: --- kind: signature -hmac: df44919980e20290304c17643e6b0f68a89a55e78c47d2bc401e697b59e2ce0d +hmac: 40231bb97e628b0d1b3bc75425ce214b28c0c5bcba2b72c0d49c18e2a0d222a5 ...