Go.NPP-Prepper/.drone.yml

35 lines
855 B
YAML

kind: pipeline
type: kubernetes
name: 'Golang Build'
environment:
BINARY_VERSION: v0.5.1
clone:
disable: true
steps:
- name: Clone npp-prepper source repository
image: bv11-cr01.bessems.eu/proxy/alpine/git
commands:
- git clone https://code.spamasaurus.com/djpbessems/Go.NPP-Prepper.git .
# - git checkout tags/$SKOPEO_VERSION
- git checkout HEAD
when:
status:
- success
- name: Build binary
image: bv11-cr01.bessems.eu/proxy/library/golang
commands:
- |
go build -o ./bin/npp-prepper ./cmd/npp-prepper/main.go
- |
curl \
--header "Authorization: token $GIT_APIKEY" \
--upload-file bin/npp-prepper \
https://code.spamasaurus.com/api/packages/$GIT_USERNAME/generic/npp-prepper/$BINARY_VERSION/npp-prepper
environment:
GIT_APIKEY:
from_secret: git_apikey
GIT_USERNAME: djpbessems