pepebot/.drone.yml

203 lines
3.8 KiB
YAML

kind: pipeline
type: kubernetes
name: pepebot_build_amd64
platform:
os: linux
arch: amd64
steps:
- name: build-pepebot
image: golang:1.16.4-alpine
volumes:
- name: build
path: /build
environment:
CGO_ENABLED: 0
GOOS: linux
commands:
- go build -a -installsuffix cgo -o /build/app ./discord
- name: build-publish-image
image: plugins/docker
privileged: true
volumes:
- name: build
path: /build
settings:
cache_from:
- "dutchellie/pepebot:latest"
username:
from_secret: docker_username
password:
from_secret: docker_password
dockerfile: Dockerfile
repo: dutchellie/pepebot
tags:
- latest-amd64
volumes:
- name: build
temp: {}
---
kind: pipeline
type: kubernetes
name: pepebot_service_build_amd64
platform:
os: linux
arch: amd64
steps:
- name: build-pepebot_service
image: golang:1.17-alpine
volumes:
- name: build
path: /build
environment:
CGO_ENABLED: 0
GOOS: linux
commands:
- cd ./pepeservice
- go build -a -installsuffix cgo -o /build/app .
- name: build-service
image: plugins/docker
privileged: true
volumes:
- name: build
path: /build
settings:
cache_from:
- "dutchellie/pepebot_service:latest"
username:
from_secret: docker_username
password:
from_secret: docker_password
dockerfile: pepeservice/Dockerfile
repo: dutchellie/pepebot_service
tags:
- latest-amd64
volumes:
- name: build
temp: {}
---
kind: pipeline
type: docker
name: pepebot_build_arm64
platform:
os: linux
arch: arm64
steps:
- name: build-pepebot
image: golang:1.16.4-alpine
volumes:
- name: build
path: /build
environment:
CGO_ENABLED: 0
GOOS: linux
commands:
- go build -a -installsuffix cgo -o /build/app ./discord
- name: build-publish-image
image: plugins/docker
privileged: true
volumes:
- name: build
path: /build
settings:
cache_from:
- "dutchellie/pepebot:latest"
username:
from_secret: docker_username
password:
from_secret: docker_password
dockerfile: Dockerfile
repo: dutchellie/pepebot
tags:
- latest-arm64
volumes:
- name: build
temp: {}
---
kind: pipeline
type: docker
name: pepebot_service_build_arm64
platform:
os: linux
arch: arm64
steps:
- name: build-pepebot_service
image: golang:1.17-alpine
volumes:
- name: build
path: /build
environment:
CGO_ENABLED: 0
GOOS: linux
commands:
- cd ./pepeservice
- go build -a -installsuffix cgo -o /build/app .
- name: build-service
image: plugins/docker
privileged: true
volumes:
- name: build
path: /build
settings:
cache_from:
- "dutchellie/pepebot_service:latest"
username:
from_secret: docker_username
password:
from_secret: docker_password
dockerfile: pepeservice/Dockerfile
repo: dutchellie/pepebot_service
tags:
- latest-arm64
volumes:
- name: build
temp: {}
---
kind: pipeline
type: kubernetes
name: manifest
steps:
- name: manifest-main
image: plugins/manifest
settings:
platforms:
- linux/amd64
- linux/arm64
target: dutchellie/pepebot:latest
template: dutchellie/pepebot:latest-ARCH
username:
from_secret: docker_username
password:
from_secret: docker_password
- name: manifest-pepebotservice
image: plugins/manifest
settings:
platforms:
- linux/amd64
- linux/arm64
target: dutchellie/pepebot_service:latest
template: dutchellie/pepebot_service:latest-ARCH
username:
from_secret: docker_username
password:
from_secret: docker_password
depends_on:
- pepebot_build_arm64
- pepebot_build_amd64
- pepebot_service_build_arm64
- pepebot_service_build_amd64