All checks were successful
continuous-integration/drone/push Build is passing
87 lines
1.5 KiB
YAML
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.22.1
|
|
volumes:
|
|
- name: go
|
|
path: /go
|
|
- name: gopkg
|
|
path: /cache
|
|
commands:
|
|
- go test -v ./...
|
|
- go build ./...
|
|
|
|
- name: goreleaser
|
|
image: golang:1.22.1
|
|
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: dd3e23e16a418386ae49fd99e25bd5a9a87abf87515124d76d4a744b7ba44e04
|
|
|
|
...
|