StaticBinary.Skopeo/.drone.yml

70 lines
1.7 KiB
YAML
Raw Normal View History

2022-07-27 08:27:12 +00:00
kind: pipeline
type: kubernetes
name: 'Golang Build'
environment:
2023-08-25 14:18:43 +00:00
SKOPEO_VERSION: v1.13.3
2022-07-27 09:09:34 +00:00
clone:
disable: true
2022-07-27 08:27:12 +00:00
steps:
2023-02-09 12:36:38 +00:00
2022-07-27 08:27:12 +00:00
- 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 .
2023-02-06 13:39:34 +00:00
- git checkout tags/$SKOPEO_VERSION
2022-07-31 16:53:59 +00:00
when:
status:
- success
2023-02-09 12:36:38 +00:00
2023-02-09 12:14:09 +00:00
- name: Build binary (Linux)
2023-02-09 12:25:43 +00:00
depends_on:
- Clone skopeo source repository
2022-07-27 08:39:59 +00:00
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-27 08:39:59 +00:00
environment:
CGO_ENABLED: 0
2023-02-09 12:36:38 +00:00
2023-02-09 12:14:09 +00:00
- name: Build binary (Windows)
2023-02-09 12:25:43 +00:00
depends_on:
- Clone skopeo source repository
2023-02-09 12:14:09 +00:00
image: bv11-cr01.bessems.eu/proxy/library/golang
commands:
- apt-get update && apt-get install -y go-md2man
- |
make \
BUILDTAGS=containers_image_openpgp \
2023-02-09 12:30:51 +00:00
GO_DYN_FLAGS= \
bin/skopeo.windows.amd64.exe
2023-02-09 12:14:09 +00:00
environment:
CGO_ENABLED: 0
2023-02-09 12:36:38 +00:00
- name: Upload binaries
depends_on:
- Build binary (Linux)
- Build binary (Windows)
image: bv11-cr01.bessems.eu/proxy/library/golang
commands:
- |
curl \
--header "Authorization: token $GIT_APIKEY" \
2023-02-09 12:39:21 +00:00
--upload-file bin/skopeo \
https://code.spamasaurus.com/api/packages/$GIT_USERNAME/generic/skopeo/$SKOPEO_VERSION/skopeo_linux_amd64
2023-02-09 12:36:38 +00:00
- |
curl \
--header "Authorization: token $GIT_APIKEY" \
2023-02-09 12:39:21 +00:00
--upload-file bin/skopeo.windows.amd64.exe \
2023-02-09 12:41:08 +00:00
https://code.spamasaurus.com/api/packages/$GIT_USERNAME/generic/skopeo/$SKOPEO_VERSION/skopeo_windows_amd64.exe
2023-02-09 12:36:38 +00:00
environment:
2023-02-09 12:14:09 +00:00
GIT_APIKEY:
from_secret: git_apikey
GIT_USERNAME: djpbessems