0
0
mirror of https://github.com/thegeeklab/wp-github-comment.git synced 2024-11-13 23:10:40 +00:00

add dockerhub auth for ci

This commit is contained in:
Robert Kaussow 2020-11-28 13:50:39 +01:00
parent 3ef5be32e7
commit 2931248d85
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
2 changed files with 56 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',
@ -73,6 +74,7 @@ local PipelineTest = {
local PipelineBuildBinaries = { local PipelineBuildBinaries = {
kind: 'pipeline', kind: 'pipeline',
image_pull_secrets: ['docker_config'],
name: 'build-binaries', name: 'build-binaries',
platform: { platform: {
os: 'linux', os: 'linux',
@ -141,6 +143,7 @@ local PipelineBuildBinaries = {
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',
@ -157,8 +160,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.' + arch, dockerfile: 'docker/Dockerfile.' + arch,
repo: 'thegeeklab/${DRONE_REPO_NAME}', repo: 'thegeeklab/${DRONE_REPO_NAME}',
@ -172,8 +176,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.' + arch, dockerfile: 'docker/Dockerfile.' + arch,
@ -188,8 +193,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.' + arch, dockerfile: 'docker/Dockerfile.' + arch,
@ -214,6 +220,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

@ -43,6 +43,9 @@ volumes:
- name: gopath - name: gopath
temp: {} temp: {}
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -97,6 +100,9 @@ steps:
ref: ref:
- refs/tags/** - refs/tags/**
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -122,8 +128,10 @@ steps:
- go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/amd64/drone-github-comment ./cmd/drone-github-comment - go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/amd64/drone-github-comment ./cmd/drone-github-comment
- name: dryrun - name: dryrun
image: plugins/docker:18-linux-amd64 image: plugins/docker:19
settings: settings:
config:
from_secret: docker_config
dockerfile: docker/Dockerfile.amd64 dockerfile: docker/Dockerfile.amd64
dry_run: true dry_run: true
password: password:
@ -138,10 +146,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.amd64 dockerfile: docker/Dockerfile.amd64
password: password:
from_secret: docker_password from_secret: docker_password
@ -156,10 +166,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.amd64 dockerfile: docker/Dockerfile.amd64
password: password:
from_secret: quay_password from_secret: quay_password
@ -174,6 +186,9 @@ steps:
depends_on: depends_on:
- dryrun - dryrun
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -199,8 +214,10 @@ steps:
- go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/arm64/drone-github-comment ./cmd/drone-github-comment - go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/arm64/drone-github-comment ./cmd/drone-github-comment
- name: dryrun - name: dryrun
image: plugins/docker:18-linux-arm64 image: plugins/docker:19
settings: settings:
config:
from_secret: docker_config
dockerfile: docker/Dockerfile.arm64 dockerfile: docker/Dockerfile.arm64
dry_run: true dry_run: true
password: password:
@ -215,10 +232,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.arm64 dockerfile: docker/Dockerfile.arm64
password: password:
from_secret: docker_password from_secret: docker_password
@ -233,10 +252,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.arm64 dockerfile: docker/Dockerfile.arm64
password: password:
from_secret: quay_password from_secret: quay_password
@ -251,6 +272,9 @@ steps:
depends_on: depends_on:
- dryrun - dryrun
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -276,8 +300,10 @@ steps:
- go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/arm/drone-github-comment ./cmd/drone-github-comment - go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/arm/drone-github-comment ./cmd/drone-github-comment
- name: dryrun - name: dryrun
image: plugins/docker:18-linux-arm image: plugins/docker:19
settings: settings:
config:
from_secret: docker_config
dockerfile: docker/Dockerfile.arm dockerfile: docker/Dockerfile.arm
dry_run: true dry_run: true
password: password:
@ -292,10 +318,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.arm dockerfile: docker/Dockerfile.arm
password: password:
from_secret: docker_password from_secret: docker_password
@ -310,10 +338,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.arm dockerfile: docker/Dockerfile.arm
password: password:
from_secret: quay_password from_secret: quay_password
@ -328,6 +358,9 @@ steps:
depends_on: depends_on:
- dryrun - dryrun
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -416,6 +449,9 @@ steps:
- success - success
- failure - failure
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/master - refs/heads/master
@ -432,6 +468,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: c475b26373c250eff194cba0fabfddb2047242a3cfb3250ab734a2dd4f92507e hmac: 86fcc05f5bcfb7375d23185103d52209232fa92edd680298bd92a313d7eafb8c
... ...