catalog-service/.drone.yml
Piotr Biernat 43567151f6
Some checks failed
continuous-integration/drone Build is failing
.drone.yml added /etc/hosts volume
2024-06-01 15:00:28 +02:00

68 lines
1.1 KiB
YAML

kind: pipeline
type: docker
name: default
steps:
- name: static_check
image: golang:latest
commands:
- go install honnef.co/go/tools/cmd/staticcheck@latest
- cd src && staticcheck ./...
volumes:
- name: gopath
path: /go
- name: lint
image: golang:latest
commands:
- go install golang.org/x/lint/golint@latest
- golint ./src/...
volumes:
- name: gopath
path: /go
- name: analyze
image: golang:latest
commands:
- cd src && go vet ./...
volumes:
- name: gopath
path: /go
- name: publish_image
image: plugins/docker
environment:
DOCKER_USERNAME:
from_secret: registry_username
DOCKER_PASSWORD:
from_secret: registry_password
commands:
- sleep 5
- ./deploy/image-build.sh
- ./deploy/image-push.sh
volumes:
- name: docker-sock
path: /var/run
when:
branch:
- main
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: docker-sock
path: /var/run
- name: etc_hosts
path: /etc/hosts
volumes:
- name: gopath
temp: {}
- name: docker-sock
temp: {}
- name: etc_hosts
host:
path: /etc/hosts