jlelse
/
kis3
Archived
1
Fork 0

Use Drone CI

This commit is contained in:
Jan-Lukas Else 2019-04-05 21:58:22 +02:00
parent 74b4285601
commit e6ad0a8a87
4 changed files with 282 additions and 4 deletions

239
.drone.yml Normal file
View File

@ -0,0 +1,239 @@
kind: pipeline
name: build-master-amd64
platform:
os: linux
arch: amd64
steps:
- name: publish
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: kis3/kis3
tags: linux-amd64
when:
event:
- push
trigger:
ref:
- refs/heads/master
---
kind: pipeline
name: build-master-arm64
platform:
os: linux
arch: arm64
steps:
- name: publish
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: kis3/kis3
tags: linux-arm64
when:
event:
- push
trigger:
ref:
- refs/heads/master
---
kind: pipeline
name: build-master-arm
platform:
os: linux
arch: arm
steps:
- name: publish
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: kis3/kis3
tags: linux-arm
when:
event:
- push
trigger:
ref:
- refs/heads/master
---
kind: pipeline
name: manifest-master
platform:
os: linux
arch: amd64
steps:
- name: manifest
pull: always
image: plugins/manifest
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
ignore_missing: true
spec: manifest.tmpl
trigger:
ref:
- refs/heads/master
depends_on:
- build-master-amd64
- build-master-arm64
- build-master-arm
---
kind: pipeline
name: build-develop-amd64
platform:
os: linux
arch: amd64
steps:
- name: publish
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: kis3/kis3
tags: develop-linux-amd64
when:
event:
- push
trigger:
ref:
- refs/heads/develop
---
kind: pipeline
name: build-develop-arm64
platform:
os: linux
arch: arm64
steps:
- name: publish
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: kis3/kis3
tags: develop-linux-arm64
when:
event:
- push
trigger:
ref:
- refs/heads/develop
---
kind: pipeline
name: build-develop-arm
platform:
os: linux
arch: arm
steps:
- name: publish
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: kis3/kis3
tags: develop-linux-arm
when:
event:
- push
trigger:
ref:
- refs/heads/develop
---
kind: pipeline
name: manifest-develop
platform:
os: linux
arch: amd64
steps:
- name: manifest
pull: always
image: plugins/manifest
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
ignore_missing: true
spec: manifest-develop.tmpl
trigger:
ref:
- refs/heads/develop
depends_on:
- build-develop-amd64
- build-develop-arm64
- build-develop-arm
---
kind: pipeline
name: build-pull-request
platform:
os: linux
arch: amd64
steps:
- name: dryrun
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: kis3/kis3
tags: pr-linux-amd64
dry_run: true
when:
event:
- pull_request
trigger:
ref:
- "refs/pull/**"

View File

@ -1,12 +1,13 @@
FROM golang:1.12-alpine as packr FROM golang:1.12-alpine as build-base
RUN apk add --no-cache git RUN apk add --no-cache git gcc musl-dev
FROM build-base as packr
RUN go get github.com/gobuffalo/packr/v2/packr2 RUN go get github.com/gobuffalo/packr/v2/packr2
FROM golang:1.12-alpine as build FROM build-base as build
COPY --from=packr /go/bin/packr2 /go/bin COPY --from=packr /go/bin/packr2 /go/bin
ADD . /app ADD . /app
WORKDIR /app WORKDIR /app
RUN apk add --no-cache git gcc musl-dev
RUN GO111MODULE=on packr2 RUN GO111MODULE=on packr2
RUN go build kis3.dev/kis3 RUN go build kis3.dev/kis3

19
manifest-develop.tmpl Normal file
View File

@ -0,0 +1,19 @@
image: kis3/kis3:develop
manifests:
-
image: kis3/kis3:develop-linux-amd64
platform:
architecture: amd64
os: linux
-
image: kis3/kis3:develop-linux-arm64
platform:
architecture: arm64
os: linux
variant: v8
-
image: kis3/kis3:develop-linux-arm
platform:
architecture: arm
os: linux
variant: v7

19
manifest.tmpl Normal file
View File

@ -0,0 +1,19 @@
image: kis3/kis3:latest
manifests:
-
image: kis3/kis3:linux-amd64
platform:
architecture: amd64
os: linux
-
image: kis3/kis3:linux-arm64
platform:
architecture: arm64
os: linux
variant: v8
-
image: kis3/kis3:linux-arm
platform:
architecture: arm
os: linux
variant: v7