2021-02-25 17:46:40 -08:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2021-05-21 18:46:26 -07:00
|
|
|
name: validation
|
2021-02-25 17:46:40 -08:00
|
|
|
|
|
|
|
platform:
|
2021-03-31 06:17:43 +00:00
|
|
|
arch: amd64
|
2021-02-25 17:46:40 -08:00
|
|
|
|
2021-04-03 13:49:56 -07:00
|
|
|
clone:
|
|
|
|
depth: 1
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
host:
|
|
|
|
path: /run/docker.sock
|
|
|
|
|
|
|
|
steps:
|
2021-05-21 18:46:26 -07:00
|
|
|
- name: Format Code
|
|
|
|
image: golang:1.16-alpine3.13
|
|
|
|
# volumes:
|
|
|
|
# - name: dockersock
|
|
|
|
# path: /var/run/docker.sock
|
|
|
|
commands:
|
|
|
|
- go fmt ./...
|
|
|
|
- go vet ./...
|
|
|
|
- curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.18.2
|
|
|
|
- trivy repo ${DRONE_GIT_HTTP_URL}
|
|
|
|
|
|
|
|
# - name: Send Status To Datadog
|
|
|
|
# image: masci/drone-datadog
|
|
|
|
# settings:
|
|
|
|
# api_key:
|
|
|
|
# from_secret: Datadog
|
|
|
|
# events:
|
|
|
|
# - title: "Build failure on amd64"
|
|
|
|
# text: "Build ${DRONE_BUILD_NUMBER}"
|
|
|
|
# alert_type: "error"
|
|
|
|
# when:
|
|
|
|
# status:
|
|
|
|
# - failure
|
|
|
|
#
|