Meutel
f0f72d3ac6
Some checks failed
continuous-integration/drone/push Build is failing
* log on startup * display on about page * use compile flag * set with git tag value
87 lines
1.7 KiB
YAML
87 lines
1.7 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
|
|
environment:
|
|
registry_login:
|
|
from_secret: registry_login
|
|
registry_password:
|
|
from_secret: registry_password
|
|
settings:
|
|
playbook: .ansible/deploy-draft.yml
|
|
inventory: .ansible/inventory
|
|
private_key:
|
|
from_secret: drone_ssh_key
|
|
extra_vars:
|
|
- draft_name=${DRONE_BRANCH##feature/}
|
|
- registry_login=${registry_login}
|
|
- registry_password=${registry_password}
|
|
when:
|
|
branch:
|
|
- feature/*
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
- tag
|
|
|
|
---
|
|
kind: signature
|
|
hmac: b318e85797aceda52c80262ca1cb712968e997993218816d6bea731b846531aa
|
|
|
|
...
|