mirror of
https://github.com/dragonheim/gagent.git
synced 2025-04-26 08:08:58 -07:00
Adding very preliminary build via buildx.
This commit is contained in:
parent
5c3c84768c
commit
db808b5733
1 changed files with 13 additions and 4 deletions
17
.drone.yml
17
.drone.yml
|
@ -15,9 +15,9 @@ volumes:
|
||||||
path: /run/docker.sock
|
path: /run/docker.sock
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Validate code base
|
- name: Validate code base and dependencies
|
||||||
# image: golang:1.16-alpine3.13
|
# image: golang:1.16-alpine3.13
|
||||||
image: golang:1.16.4
|
image: dragonheim/golang:1.16.4
|
||||||
environment:
|
environment:
|
||||||
TRIVY_QUIET: true
|
TRIVY_QUIET: true
|
||||||
TRIVY_LIGHT: true
|
TRIVY_LIGHT: true
|
||||||
|
@ -26,20 +26,29 @@ steps:
|
||||||
TRIVY_NO_PROGRESS: true
|
TRIVY_NO_PROGRESS: true
|
||||||
commands:
|
commands:
|
||||||
### Populate temporary container with tools / files we will need for building and testing
|
### Populate temporary container with tools / files we will need for building and testing
|
||||||
# - apk add --no-cache zeromq-dev build-base git
|
- apk add --no-cache zeromq-dev zeromq
|
||||||
# - curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.18.2
|
# - curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.18.2
|
||||||
|
|
||||||
### Format the go code. Go does not care about it, but it helps to ensure everything is formated the same.
|
### Format the go code. Go does not care about it, but it helps to ensure everything is formated the same.
|
||||||
- go fmt ./...
|
- go fmt ./...
|
||||||
|
|
||||||
### Perform a basic lint of the code, we do this after formatting, just in case there are edge cases with the formatting.
|
### Perform a basic lint of the code, we do this after formatting, just in case there are edge cases with the formatting.
|
||||||
- go vet ./...
|
- go vet ./...
|
||||||
|
|
||||||
### Run a security check and warn us about lower level vulnerabilities
|
### Run a security check and warn us about lower level vulnerabilities
|
||||||
- trivy fs --exit-code 0 --severity UNKNOWN,LOW,MEDIUM .
|
- trivy fs --exit-code 0 --severity UNKNOWN,LOW,MEDIUM .
|
||||||
|
|
||||||
### Re-run the scan, but this time looking for higher level vulnerabilities that we want to block for.
|
### Re-run the scan, but this time looking for higher level vulnerabilities that we want to block for.
|
||||||
- trivy fs --skip-update --exit-code 1 --severity CRITICAL,HIGH .
|
- trivy fs --skip-update --exit-code 1 --severity CRITICAL,HIGH .
|
||||||
|
|
||||||
### Perform unit tests
|
### Perform unit tests
|
||||||
# - @TODO I really don't know how to do unit tests. Will need to figure this out eventually.
|
# - @TODO I really don't know how to do unit tests. Will need to figure this out eventually.
|
||||||
|
|
||||||
- name: Send Status To Datadog
|
### Build test container.
|
||||||
|
- docker buildx build --platform linux/arm/v7,linux/amd64,linux/arm64 --progress plain -t ${DRONE_REPO}:${DRONE_COMMIT} .
|
||||||
|
|
||||||
|
|
||||||
|
- name: Notify Datadog
|
||||||
image: masci/drone-datadog
|
image: masci/drone-datadog
|
||||||
settings:
|
settings:
|
||||||
api_key:
|
api_key:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue