Private
Public Access
1
0
Files
data-api/.drone.yml
Ask Bjørn Hansen 4d2ff44b18
All checks were successful
continuous-integration/drone/push Build is passing
Update dependencies; better logging and tracing
2023-11-21 12:15:19 -08:00

87 lines
1.5 KiB
YAML

---
kind: pipeline
type: kubernetes
name: default
environment:
GOCACHE: /cache/pkg/cache
GOMODCACHE: /cache/pkg/mod
steps:
- name: fetch-tags
image: alpine/git
commands:
- git fetch --tags
resources:
requests:
cpu: 250
memory: 50MiB
limits:
cpu: 250
memory: 100MiB
- name: test
image: golang:1.21.4
volumes:
- name: go
path: /go
- name: gopkg
path: /cache
commands:
- go test -v ./...
- go build ./...
- name: goreleaser
image: golang:1.21.4
resources:
requests:
cpu: 6000
memory: 1024MiB
limits:
cpu: 10000
memory: 4096MiB
volumes:
- name: go
path: /go
- name: gopkg
path: /cache
environment:
# GITHUB_TOKEN:
# from_secret: GITHUB_TOKEN
commands:
- ./scripts/run-goreleaser
depends_on: [test]
- name: docker
image: harbor.ntppool.org/ntppool/drone-kaniko:main
pull: always
volumes:
- name: go
path: /go
- name: gopkg
path: /cache
settings:
repo: ntppool/data-api
registry: harbor.ntppool.org
auto_tag: true
tags: SHA7,${DRONE_SOURCE_BRANCH}
cache: true
username:
from_secret: harbor_username
password:
from_secret: harbor_password
depends_on: [goreleaser]
volumes:
- name: go
temp: {}
- name: gopkg
claim:
name: go-pkg
---
kind: signature
hmac: decaee945fdc81d38afbc85c69e3192f9c798e599af1c7a9d0a2f2c97c806f63
...