vegvisir/.drone.yml

70 lines
1.3 KiB
YAML
Raw Normal View History

2021-07-23 02:00:02 +02:00
kind: pipeline
type: docker
name: default
steps:
- name: static_check
image: golang:alpine
commands:
- apk update && apk --no-cache add git gcc glibc
- go install honnef.co/go/tools/cmd/staticcheck@latest
- staticcheck ./pkg/...
volumes:
- name: gopath
path: /go
- name: lint
image: golang:alpine
commands:
- apk update && apk --no-cache add git gcc glibc
- go install golang.org/x/lint/golint@latest
- golint -set_exit_status ./pkg/...
volumes:
- name: gopath
path: /go
- name: vet
image: golang:alpine
commands:
- apk update && apk --no-cache add git gcc glibc
- go vet ./pkg/...
volumes:
- name: gopath
path: /go
2022-04-16 18:57:59 +02:00
- name: build_image
image: plugins/docker
commands:
- sleep 5
- ./deploy/build_image.sh
2022-04-16 18:57:59 +02:00
volumes:
- name: docker-sock
path: /var/run
- name: push_image
image: plugins/docker
environment:
DOCKER_USERNAME:
from_secret: registry_username
DOCKER_PASSWORD:
from_secret: registry_password
commands:
- ./deploy/publish_image.sh
2022-04-16 18:57:59 +02:00
volumes:
- name: docker-sock
path: /var/run
2022-04-16 18:57:59 +02:00
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: docker-sock
path: /var/run
volumes:
- name: gopath
2022-04-16 18:57:59 +02:00
temp: {}
- name: docker-sock
temp: {}