forked from zv0n/lunch-go
73 lines
1.2 KiB
YAML
73 lines
1.2 KiB
YAML
---
|
|
kind: pipeline
|
|
type: kubernetes
|
|
name: build
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: formatting-check
|
|
image: golang
|
|
commands:
|
|
- test -z $(gofmt -l .)
|
|
- name: build
|
|
image: docker:dind
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
commands:
|
|
- sleep 20s
|
|
- docker build -f Dockerfile .
|
|
|
|
services:
|
|
- name: docker
|
|
image: docker:dind
|
|
privileged: true
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
|
|
volumes:
|
|
- name: dockersock
|
|
temp: {}
|
|
---
|
|
kind: pipeline
|
|
type: kubernetes
|
|
name: deploy
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: deploy
|
|
image: docker:dind
|
|
environment:
|
|
DOCKER_USERNAME:
|
|
from_secret: DOCKER_USERNAME
|
|
DOCKER_PASSWORD:
|
|
from_secret: DOCKER_PASSWORD
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
commands:
|
|
- echo "$DOCKER_USERNAME"
|
|
- docker login "docker.zvon.tech" --username "$DOCKER_USERNAME" --password "$DOCKER_PASSWORD"
|
|
- docker buildx create --use
|
|
- docker buildx build -f Dockerfile -t "docker.zvon.tech/lunch-go:${DRONE_TAG}" --platform linux/amd64,linux/arm64 --push .
|
|
|
|
services:
|
|
- name: docker
|
|
image: docker:dind
|
|
privileged: true
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
|
|
volumes:
|
|
- name: dockersock
|
|
temp: {}
|
|
|
|
trigger:
|
|
event:
|
|
- tag |