StatusApp/.drone.yml

69 lines
1.1 KiB
YAML

2020-04-21 13:32:49 +07:00
kind: pipeline
name: Build Application
steps:
2020-04-23 08:31:34 +07:00
- name: Build
2020-04-21 13:32:49 +07:00
image: golang:1.14
commands:
- go build ./...
volumes:
- name: deps
path: /go
2020-04-23 08:31:34 +07:00
- name: Test
image: golang:1.14
commands:
2020-04-21 13:32:49 +07:00
- go test ./...
volumes:
- name: deps
path: /go
2020-04-23 08:31:34 +07:00
- name: Lint
image: golangci/golangci-lint:v1.25.0
commands:
- golangci-lint run -v
volumes:
- name: deps
path: /go
volumes:
- name: deps
temp: {}
2020-04-21 13:32:49 +07:00
---
kind: pipeline
name: Build Docker Image
steps:
- name: Build Docker Image
image: plugins/docker
settings:
registry: docker.teamortix.com
username: droneci
password:
from_secret: docker_password
repo: docker.teamortix.com/teamortix/status
tags: test
purge: true
trigger:
event:
exclude:
- tag
depends_on:
- Build Application
---
kind: pipeline
name: Continuous Deployment
steps:
- name: Deploy Docker Image
image: plugins/docker
settings:
registry: docker.teamortix.com
username: droneci
password:
from_secret: docker_password
repo: docker.teamortix.com/teamortix/status
auto_tag: true
trigger:
event:
- tag
depends_on:
- Build Application