0
0
mirror of https://github.com/thegeeklab/wp-docker-buildx.git synced 2024-11-09 17:20:39 +00:00

Add arm docker images and fix pipeline dependencies

This commit is contained in:
Thomas Boerger 2019-01-21 21:17:12 +01:00
parent b782db068f
commit 2ca0313b38
No known key found for this signature in database
GPG Key ID: 09745AFF9D63C79B
8 changed files with 330 additions and 10 deletions

View File

@ -106,7 +106,7 @@ local PipelineBuild(binary="docker", os="linux", arch="amd64") = {
},
],
depends_on: [
"testing",
if binary == "docker" then "testing" else os + "-" + arch + "-docker",
],
trigger: {
branch: [ "master" ],
@ -144,6 +144,7 @@ local PipelineNotifications(binary="docker") = {
depends_on: [
"linux-amd64-" + binary,
"linux-arm64-" + binary,
"linux-arm-" + binary,
],
trigger: {
branch: [ "master" ],
@ -155,12 +156,16 @@ local PipelineNotifications(binary="docker") = {
PipelineTesting,
PipelineBuild("docker", "linux", "amd64"),
PipelineBuild("docker", "linux", "arm64"),
PipelineBuild("docker", "linux", "arm"),
PipelineBuild("gcr", "linux", "amd64"),
PipelineBuild("gcr", "linux", "arm64"),
PipelineBuild("gcr", "linux", "arm"),
PipelineBuild("ecr", "linux", "amd64"),
PipelineBuild("ecr", "linux", "arm64"),
PipelineBuild("ecr", "linux", "arm"),
PipelineBuild("heroku", "linux", "amd64"),
PipelineBuild("heroku", "linux", "arm64"),
PipelineBuild("heroku", "linux", "arm"),
PipelineNotifications("docker"),
PipelineNotifications("gcr"),
PipelineNotifications("ecr"),

View File

@ -175,6 +175,80 @@ trigger:
depends_on:
- testing
---
kind: pipeline
name: linux-arm-docker
platform:
os: linux
arch: arm
steps:
- name: build-push
pull: always
image: golang:1.11
commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-docker ./cmd/drone-docker"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- push
- pull_request
- name: build-tag
pull: always
image: golang:1.11
commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-docker ./cmd/drone-docker"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
- name: dryrun
pull: always
image: plugins/docker:linux-arm
settings:
dockerfile: docker/docker/Dockerfile.linux.arm
dry_run: true
password:
from_secret: docker_password
repo: plugins/docker
tags: linux-arm
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish
pull: always
image: plugins/docker:linux-arm
settings:
auto_tag: true
auto_tag_suffix: linux-arm
dockerfile: docker/docker/Dockerfile.linux.arm
password:
from_secret: docker_password
repo: plugins/docker
username:
from_secret: docker_username
when:
event:
- push
- tag
trigger:
branch:
- master
depends_on:
- testing
---
kind: pipeline
name: linux-amd64-gcr
@ -247,7 +321,7 @@ trigger:
- master
depends_on:
- testing
- linux-amd64-docker
---
kind: pipeline
@ -321,7 +395,81 @@ trigger:
- master
depends_on:
- testing
- linux-arm64-docker
---
kind: pipeline
name: linux-arm-gcr
platform:
os: linux
arch: arm
steps:
- name: build-push
pull: always
image: golang:1.11
commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-gcr ./cmd/drone-gcr"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- push
- pull_request
- name: build-tag
pull: always
image: golang:1.11
commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-gcr ./cmd/drone-gcr"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
- name: dryrun
pull: always
image: plugins/docker:linux-arm
settings:
dockerfile: docker/gcr/Dockerfile.linux.arm
dry_run: true
password:
from_secret: docker_password
repo: plugins/gcr
tags: linux-arm
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish
pull: always
image: plugins/docker:linux-arm
settings:
auto_tag: true
auto_tag_suffix: linux-arm
dockerfile: docker/gcr/Dockerfile.linux.arm
password:
from_secret: docker_password
repo: plugins/gcr
username:
from_secret: docker_username
when:
event:
- push
- tag
trigger:
branch:
- master
depends_on:
- linux-arm-docker
---
kind: pipeline
@ -395,7 +543,7 @@ trigger:
- master
depends_on:
- testing
- linux-amd64-docker
---
kind: pipeline
@ -469,7 +617,81 @@ trigger:
- master
depends_on:
- testing
- linux-arm64-docker
---
kind: pipeline
name: linux-arm-ecr
platform:
os: linux
arch: arm
steps:
- name: build-push
pull: always
image: golang:1.11
commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-ecr ./cmd/drone-ecr"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- push
- pull_request
- name: build-tag
pull: always
image: golang:1.11
commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-ecr ./cmd/drone-ecr"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
- name: dryrun
pull: always
image: plugins/docker:linux-arm
settings:
dockerfile: docker/ecr/Dockerfile.linux.arm
dry_run: true
password:
from_secret: docker_password
repo: plugins/ecr
tags: linux-arm
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish
pull: always
image: plugins/docker:linux-arm
settings:
auto_tag: true
auto_tag_suffix: linux-arm
dockerfile: docker/ecr/Dockerfile.linux.arm
password:
from_secret: docker_password
repo: plugins/ecr
username:
from_secret: docker_username
when:
event:
- push
- tag
trigger:
branch:
- master
depends_on:
- linux-arm-docker
---
kind: pipeline
@ -543,7 +765,7 @@ trigger:
- master
depends_on:
- testing
- linux-amd64-docker
---
kind: pipeline
@ -617,7 +839,81 @@ trigger:
- master
depends_on:
- testing
- linux-arm64-docker
---
kind: pipeline
name: linux-arm-heroku
platform:
os: linux
arch: arm
steps:
- name: build-push
pull: always
image: golang:1.11
commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-heroku ./cmd/drone-heroku"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- push
- pull_request
- name: build-tag
pull: always
image: golang:1.11
commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-heroku ./cmd/drone-heroku"
environment:
CGO_ENABLED: 0
GO111MODULE: on
when:
event:
- tag
- name: dryrun
pull: always
image: plugins/docker:linux-arm
settings:
dockerfile: docker/heroku/Dockerfile.linux.arm
dry_run: true
password:
from_secret: docker_password
repo: plugins/heroku
tags: linux-arm
username:
from_secret: docker_username
when:
event:
- pull_request
- name: publish
pull: always
image: plugins/docker:linux-arm
settings:
auto_tag: true
auto_tag_suffix: linux-arm
dockerfile: docker/heroku/Dockerfile.linux.arm
password:
from_secret: docker_password
repo: plugins/heroku
username:
from_secret: docker_username
when:
event:
- push
- tag
trigger:
branch:
- master
depends_on:
- linux-arm-docker
---
kind: pipeline
@ -656,6 +952,7 @@ trigger:
depends_on:
- linux-amd64-docker
- linux-arm64-docker
- linux-arm-docker
---
kind: pipeline
@ -694,6 +991,7 @@ trigger:
depends_on:
- linux-amd64-gcr
- linux-arm64-gcr
- linux-arm-gcr
---
kind: pipeline
@ -732,6 +1030,7 @@ trigger:
depends_on:
- linux-amd64-ecr
- linux-arm64-ecr
- linux-arm-ecr
---
kind: pipeline
@ -770,5 +1069,6 @@ trigger:
depends_on:
- linux-amd64-heroku
- linux-arm64-heroku
- linux-arm-heroku
...

View File

@ -1 +1,4 @@
# see https://github.com/docker-library/docker/issues/67
FROM docker:18.06-dind
ADD release/linux/arm/drone-docker /bin/
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-docker"]

View File

@ -1,4 +1,4 @@
FROM arm64v8/docker:18.06-dind
FROM docker:18.06-dind
ADD release/linux/arm64/drone-docker /bin/
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-docker"]

View File

@ -0,0 +1,4 @@
FROM plugins/docker:linux-arm
ADD release/linux/arm/drone-ecr /bin/
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-ecr"]

View File

@ -0,0 +1,4 @@
FROM plugins/docker:linux-arm
ADD release/linux/arm/drone-gcr /bin/
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-gcr"]

View File

@ -1,4 +1,4 @@
FROM plugins/docker:latest
FROM plugins/docker:linux-amd64
ADD release/linux/amd64/drone-heroku /bin/
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-heroku"]

View File

@ -0,0 +1,4 @@
FROM plugins/docker:linux-arm
ADD release/linux/arm/drone-heroku /bin/
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-heroku"]