Go.NPP-Prepper/.drone.yml
Danny Bessems ae0b6a76bf
All checks were successful
continuous-integration/drone/push Build is passing
Inverse boolean flag
2023-03-02 16:56:42 +01:00

35 lines
855 B
YAML

kind: pipeline
type: kubernetes
name: 'Golang Build'
environment:
BINARY_VERSION: v0.5.2
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