Go.NPP-Prepper/.drone.yml
Danny Bessems 103e355b8e
All checks were successful
continuous-integration/drone/push Build is passing
Prevent overwriting existing properties
2022-12-26 16:52:38 +01:00

35 lines
897 B
YAML

kind: pipeline
type: kubernetes
name: 'Golang Build'
environment:
BINARY_VERSION: v0.3.2
clone:
disable: true
steps:
- name: Clone vappproperty-manager source repository
image: bv11-cr01.bessems.eu/proxy/alpine/git
commands:
- git clone https://code.spamasaurus.com/djpbessems/Go.vAppPropertyManager.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/vappprop-manager ./cmd/vappprop-manager/main.go
- |
curl \
--header "Authorization: token $GIT_APIKEY" \
--upload-file bin/vappprop-manager \
https://code.spamasaurus.com/api/packages/$GIT_USERNAME/generic/vappprop-manager/$BINARY_VERSION/vappprop-manager
environment:
GIT_APIKEY:
from_secret: git_apikey
GIT_USERNAME: djpbessems