feat(ci): add pipeline to publish dev static binaries
ci/woodpecker/push/dev Pipeline was successful Details
ci/woodpecker/push/docker Pipeline was successful Details

release/0.2.0
Jef Roosens 2023-11-17 14:15:53 +01:00
parent 5dc9b99a0a
commit 8d8aef8111
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,41 @@
matrix:
PLATFORM:
- 'linux/amd64'
platform: ${PLATFORM}
branches:
exclude: [ main ]
pipeline:
build-lander:
image: 'alpine:edge'
commands:
- apk add --no-cache build-base make
- make CFLAGS='-O3' LDFLAGS='-flto -static'
- strip -s build/lander
- du -h build/lander
- '[ "$(readelf -d build/lander | grep NEEDED | wc -l)" = 0 ]'
build-landerctl:
image: 'alpine:3.18.0'
commands:
- >
apk add --no-cache
build-base git make curl-static curl-dev file-dev libmagic-static
openssl-libs-static openssl-dev libidn2-static libidn2-dev
nghttp2-static nghttp2-dev libunistring-static libunistring-dev
brotli-static brotli-dev zlib-static zlib-dev
- make -C landerctl CFLAGS='-O3' LDFLAGS='-flto -static' LIBS='magic curl ssl nghttp2 crypto idn2 unistring brotlidec brotlienc brotlicommon z'
- strip -s landerctl/build/landerctl
- du -h landerctl/build/landerctl
- '[ "$(readelf -d landerctl/build/landerctl | grep NEEDED | wc -l)" = 0 ]'
upload:
image: 'alpine:3.18.0'
commands:
- apk add --no-cache minio-client
- mcli alias set rb 'https://s3.rustybever.be' "$MINIO_ACCESS_KEY" "$MINIO_SECRET_KEY"
- mcli cp build/lander landerctl/build/landerctl "rb/lander/commits/$CI_COMMIT_SHA/"
secrets:
- minio_access_key
- minio_secret_key