fix drone.yml formatting

This commit is contained in:
Robert Kaussow 2021-09-19 00:05:24 +02:00
parent d179fcb6ca
commit aef7fb81cb
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 133 additions and 113 deletions

View File

@ -164,7 +164,7 @@ local PipelineNotifications(deps=[],) = {
steps: [ steps: [
{ {
name: 'matrix', name: 'matrix',
image: 'plugins/matrix', image: 'thegeeklab/drone-matrix',
settings: { settings: {
homeserver: { from_secret: 'matrix_homeserver' }, homeserver: { from_secret: 'matrix_homeserver' },
roomid: { from_secret: 'matrix_roomid' }, roomid: { from_secret: 'matrix_roomid' },

View File

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