2023-06-28 14:21:27 +02:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
steps:
|
|
|
|
- name: run gitleaks
|
|
|
|
image: plugins/gitleaks
|
|
|
|
settings:
|
|
|
|
path: .
|
|
|
|
|
2023-06-30 11:43:09 +02:00
|
|
|
- name: build package
|
|
|
|
image: registry.mgrote.net/fpm:latest
|
2023-06-28 14:21:27 +02:00
|
|
|
environment:
|
|
|
|
DEBIAN_FRONTEND: noninteractive
|
2023-06-28 14:41:01 +02:00
|
|
|
auth_token:
|
|
|
|
from_secret: httpd-api-server-token
|
2023-06-28 14:21:27 +02:00
|
|
|
commands:
|
|
|
|
- git clone https://git.mgrote.net/Mirror/sanoid.git
|
|
|
|
- cd sanoid
|
|
|
|
- # checkout latest stable release or stay on master for bleeding edge stuff (but expect bugs!)
|
|
|
|
- git checkout $(git tag | grep "^v" | tail -n 1)
|
2023-06-28 14:52:13 +02:00
|
|
|
- export version=$(git tag | grep "^v" | tail -n 1 | tr -d v)
|
2023-06-30 11:45:48 +02:00
|
|
|
- echo $version
|
2023-06-30 11:43:09 +02:00
|
|
|
- ls -lah
|
|
|
|
- pwd
|
2023-06-30 11:43:46 +02:00
|
|
|
- chmod 0755 sanoid
|
|
|
|
- chmod 0755 syncoid
|
2023-06-30 11:43:09 +02:00
|
|
|
- |
|
|
|
|
fpm \
|
|
|
|
-s dir \
|
|
|
|
-t deb \
|
2023-06-30 11:44:50 +02:00
|
|
|
--name sanoid \
|
2023-06-30 11:43:09 +02:00
|
|
|
--architecture all \
|
2023-06-30 11:44:50 +02:00
|
|
|
--description "sanoid deb package" \
|
|
|
|
--url "https://git.mgrote.net/mg/sanoid-deb" \
|
|
|
|
-p sanoid_$${VERSION}.deb \
|
2023-06-30 11:43:09 +02:00
|
|
|
-v $${VERSION} \
|
|
|
|
sanoid=/usr/bin/sanoid \
|
|
|
|
syncoid=/usr/bin/syncoid \
|
|
|
|
sanoid.conf=/etc/sanoid/sanoid.conf \
|
|
|
|
sanoid.defaults.conf=/etc/sanoid/sanoid.defaults.conf
|
|
|
|
- pwd
|
|
|
|
- ls -lah
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-28 14:21:27 +02:00
|
|
|
- |
|
2023-06-30 11:44:50 +02:00
|
|
|
curl -X POST -H "token: $auth_token" -F "file=@./sanoid_$${VERSION}.deb" http://docker10.grote.lan:5040/upload
|
2023-06-28 14:21:27 +02:00
|
|
|
|
|
|
|
image_pull_secrets: # wird für den Login auf registry.mgrote.net benötigt
|
|
|
|
- dockerconfigjson
|
|
|
|
# siehe: https://wiki.mgrote.net/artikel/technik/drone.io_-_pull_secrets
|