vegvisir/.drone.yml
Piotr Biernat 2bf49c405b
All checks were successful
continuous-integration/drone/push Build is passing
[fix] CI/CD fixes
2022-04-21 22:39:44 +02:00

73 lines
1.2 KiB
YAML

kind: pipeline
type: docker
name: default
steps:
- name: go_static_check
image: golang:latest
commands:
- go install honnef.co/go/tools/cmd/staticcheck@latest
- staticcheck ./pkg/...
volumes:
- name: gopath
path: /go
- name: go_lint
image: golang:latest
commands:
- go install golang.org/x/lint/golint@latest
- golint -set_exit_status ./pkg/...
volumes:
- name: gopath
path: /go
- name: go_vet
image: golang:latest
commands:
- go vet ./pkg/...
volumes:
- name: gopath
path: /go
- name: build_image
image: plugins/docker
commands:
- sleep 5
- ./deploy/build_image.sh
depends_on:
- go_static_check
- go_lint
- go_vet
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
depends_on:
- build_image
volumes:
- name: docker-sock
path: /var/run
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: docker-sock
path: /var/run
volumes:
- name: gopath
temp: {}
- name: docker-sock
temp: {}