drone-template-lib/.drone.yml

149 lines
2.7 KiB
YAML
Raw Normal View History

2019-02-19 09:07:06 +00:00
---
depends_on: []
2019-02-19 09:07:06 +00:00
kind: pipeline
name: test
2019-02-19 09:07:06 +00:00
platform:
arch: amd64
os: linux
2019-02-19 09:07:06 +00:00
steps:
- commands:
2020-09-18 16:15:25 +00:00
- go run honnef.co/go/tools/cmd/staticcheck ./...
image: golang:1.16
name: staticcheck
2020-09-18 16:15:25 +00:00
volumes:
- name: gopath
path: /go
- commands:
2020-09-18 16:15:25 +00:00
- go run golang.org/x/lint/golint -set_exit_status ./...
image: golang:1.16
name: lint
2020-09-18 16:15:25 +00:00
volumes:
- name: gopath
path: /go
- commands:
2019-02-19 09:07:06 +00:00
- go vet ./...
image: golang:1.16
name: vet
2019-02-19 09:07:06 +00:00
volumes:
- name: gopath
path: /go
- commands:
- go test -cover ./...
image: golang:1.16
name: test
2019-02-19 09:07:06 +00:00
volumes:
- name: gopath
path: /go
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
2019-02-19 09:07:06 +00:00
volumes:
- name: gopath
temp: {}
---
depends_on:
- test
image_pull_secrets:
- docker_config
kind: pipeline
name: release
platform:
arch: amd64
os: linux
steps:
- commands:
- git fetch -tq
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased
unreleased}
image: thegeeklab/git-chglog
name: changelog-generate
- commands:
- prettier CHANGELOG.md
- prettier -w CHANGELOG.md
image: thegeeklab/alpine-tools
name: changelog-format
- image: plugins/github-release
name: publish
settings:
api_key:
from_secret: github_token
note: CHANGELOG.md
overwrite: true
title: ${DRONE_TAG}
when:
ref:
- refs/tags/**
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
---
depends_on:
- release
kind: pipeline
name: docs
platform:
arch: amd64
os: linux
steps:
- commands:
- markdownlint 'README.md' 'CONTRIBUTING.md'
image: thegeeklab/markdownlint-cli
name: markdownlint
- commands:
- npm install -g spellchecker-cli
- spellchecker --files 'README.md' 'CONTRIBUTING.md' -d .dictionary -p spell indefinite-article
syntax-urls --no-suggestions
environment:
FORCE_COLOR: true
NPM_CONFIG_LOGLEVEL: error
image: node:lts-alpine
name: spellcheck
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
---
depends_on:
- docs
kind: pipeline
name: notifications
platform:
arch: amd64
os: linux
steps:
- image: plugins/matrix
name: matrix
settings:
homeserver:
from_secret: matrix_homeserver
password:
from_secret: matrix_password
roomid:
from_secret: matrix_roomid
template: 'Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name
}}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message:
{{ build.message }}'
username:
from_secret: matrix_username
when:
status:
- success
- failure
trigger:
ref:
- refs/heads/main
- refs/tags/**
status:
- success
- failure
---
kind: signature
2021-09-18 16:55:05 +00:00
hmac: 90235d1911233db57107b28ec6925c75d4b788f40771ee454b8c14b57b3265cb
2019-02-19 09:07:06 +00:00
2020-09-18 16:15:25 +00:00
...