64 lines
1.6 KiB
YAML
64 lines
1.6 KiB
YAML
kind: pipeline
|
|
type: kubernetes
|
|
name: 'Golang Build'
|
|
|
|
environment:
|
|
SKOPEO_VERSION: v1.11.0
|
|
|
|
clone:
|
|
disable: true
|
|
|
|
steps:
|
|
- name: Clone skopeo source repository
|
|
image: bv11-cr01.bessems.eu/proxy/alpine/git
|
|
commands:
|
|
- git clone https://github.com/containers/skopeo.git .
|
|
- git checkout tags/$SKOPEO_VERSION
|
|
when:
|
|
status:
|
|
- success
|
|
- name: Build binary (Linux)
|
|
depends_on:
|
|
- Clone skopeo source repository
|
|
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=
|
|
- bin/skopeo --version
|
|
- |
|
|
curl \
|
|
--header "Authorization: token $GIT_APIKEY" \
|
|
--upload-file bin/skopeo \
|
|
https://code.spamasaurus.com/api/packages/$GIT_USERNAME/generic/skopeo/$SKOPEO_VERSION/skopeo
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
GIT_APIKEY:
|
|
from_secret: git_apikey
|
|
GIT_USERNAME: djpbessems
|
|
- name: Build binary (Windows)
|
|
depends_on:
|
|
- Clone skopeo source repository
|
|
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= \
|
|
bin/skopeo.windows.amd64.exe
|
|
- ls bin
|
|
# - bin/skopeo --version
|
|
# - |
|
|
# curl \
|
|
# --header "Authorization: token $GIT_APIKEY" \
|
|
# --upload-file bin/skopeo \
|
|
# https://code.spamasaurus.com/api/packages/$GIT_USERNAME/generic/skopeo/$SKOPEO_VERSION/skopeo
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
GIT_APIKEY:
|
|
from_secret: git_apikey
|
|
GIT_USERNAME: djpbessems
|