go-bouquins/.drone.yml
Meutel e2f90ffb80
All checks were successful
continuous-integration/drone/push Build is passing
Version
* log on startup
* display on about page
* use compile flag
* set with git tag value
2019-09-28 17:44:55 +02:00

80 lines
1.5 KiB
YAML

---
kind: pipeline
type: docker
name: default
steps:
- name: build
image: golang
environment:
CGO_ENABLED: 1
GOOS: linux
commands:
- go test ./...
- go build -a -installsuffix cgo .
- name: lint
image: golang
commands:
- go get -u golang.org/x/lint/golint
- golint -set_exit_status ./...
- name: vet
image: golang
commands:
- go vet ./...
- name: docker
image: plugins/docker
settings:
registry: reg.meutel.net
repo: reg.meutel.net/go-bouquins
build_args: "version=$DRONE_TAG"
username:
from_secret: registry_login
password:
from_secret: registry_password
auto_tag: true
when:
event:
- tag
- name: docker-branch
image: plugins/docker
settings:
registry: reg.meutel.net
repo: reg.meutel.net/go-bouquins
tags: ${DRONE_BRANCH##feature/}
username:
from_secret: registry_login
password:
from_secret: registry_password
when:
branch:
- feature/*
- name: deploy-branch
image: plugins/ansible:1
settings:
playbook: .ansible/deploy-draft.yml
inventory: .ansible/inventory
private_key:
from_secret: drone_ssh_key
extra_vars:
- draft_name=${DRONE_BRANCH##feature/}
when:
branch:
- feature/*
trigger:
event:
- push
- tag
---
kind: signature
hmac: 6d31a8c73df2a63f6f04334ebf20ad9c7e4a992acb15097b1f887433748f0fd7
...