Add static and promotion of builds
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Peter Stuifzand 2021-11-20 20:57:49 +01:00
parent 892a9cec72
commit bac33043c1
Signed by: peter
GPG Key ID: 374322D56E5209E8
2 changed files with 26 additions and 4 deletions

View File

@ -1,6 +1,7 @@
---
kind: pipeline kind: pipeline
type: docker type: docker
name: default name: build
workspace: workspace:
base: /go base: /go
@ -16,13 +17,27 @@ steps:
commands: commands:
- apk --no-cache add git - apk --no-cache add git
- go get -d -t ./... - go get -d -t ./...
- go install honnef.co/go/tools/cmd/staticcheck@latest
- go build p83.nl/go/ekster/cmd/eksterd - go build p83.nl/go/ekster/cmd/eksterd
- go test ./... - go vet ./...
- go test -v ./...
- staticcheck ./...
---
kind: pipeline
type: docker
name: deploy
depends_on:
- build
workspace:
base: /go
path: src/p83.nl/go/ekster
steps:
- name: publish-personal - name: publish-personal
image: plugins/docker image: plugins/docker
depends_on:
- testing
settings: settings:
repo: registry.stuifzandapp.com/microsub-server repo: registry.stuifzandapp.com/microsub-server
registry: registry.stuifzandapp.com registry: registry.stuifzandapp.com
@ -57,3 +72,9 @@ steps:
- cd /home/microsub/microsub - cd /home/microsub/microsub
- docker-compose pull web - docker-compose pull web
- docker-compose up -d - docker-compose up -d
trigger:
event:
- promote
target:
- production

View File

@ -7,6 +7,7 @@ repos:
- id: trailing-whitespace - id: trailing-whitespace
- id: end-of-file-fixer - id: end-of-file-fixer
- id: check-yaml - id: check-yaml
args: [--allow-multiple-documents]
- id: check-merge-conflict - id: check-merge-conflict
- id: check-added-large-files - id: check-added-large-files
- repo: https://github.com/dnephin/pre-commit-golang - repo: https://github.com/dnephin/pre-commit-golang