rest-api-prototype/.drone.yml

73 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2022-04-21 19:54:02 +02:00
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 ./internal/...
volumes:
- name: gopath
path: /go
- name: go_lint
image: golang:latest
commands:
- go install golang.org/x/lint/golint@latest
- golint ./internal/...
volumes:
- name: gopath
path: /go
- name: go_vet
image: golang:latest
commands:
- go vet ./internal/...
volumes:
- name: gopath
path: /go
- name: build_image
image: plugins/docker
commands:
- sleep 5
- ./deploy/docker/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/docker/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: {}