StaticBinary.Skopeo/.drone.yml

39 lines
902 B
YAML
Raw Normal View History

2022-07-27 08:27:12 +00:00
kind: pipeline
type: kubernetes
name: 'Golang Build'
environment:
SKOPEO_VERSION: v1.9.1
2022-07-27 09:09:34 +00:00
clone:
disable: true
2022-07-27 08:27:12 +00:00
steps:
- name: Clone skopeo source repository
2022-07-27 08:30:32 +00:00
image: bv11-cr01.bessems.eu/proxy/alpine/git
2022-07-27 08:27:12 +00:00
commands:
2022-07-27 09:09:34 +00:00
- git clone https://github.com/containers/skopeo.git .
- git checkout tags/$SKOPEO_VERSION
2022-07-31 16:53:59 +00:00
when:
status:
- success
2022-07-27 08:39:59 +00:00
- name: Build binary
image: bv11-cr01.bessems.eu/proxy/library/golang
commands:
- apt-get update && apt-get install -y go-md2man
- |
make \
BUILDTAGS=containers_image_openpgp \
GO_DYN_FLAGS=
2022-07-27 09:09:34 +00:00
- bin/skopeo --version
2022-07-31 16:05:50 +00:00
- |
curl \
2022-07-31 16:10:51 +00:00
--header "Authorization: token $GIT_APIKEY" \
2022-07-31 16:05:50 +00:00
--upload-file bin/skopeo \
https://code.spamasaurus.com/api/packages/$GIT_USERNAME/generic/skopeo/$SKOPEO_VERSION/skopeo
2022-07-27 08:39:59 +00:00
environment:
CGO_ENABLED: 0
2022-07-31 16:05:50 +00:00
GIT_APIKEY:
from_secret: git_apikey
GIT_USERNAME: djpbessems