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
|
|
|
|
commands:
|
|
|
|
- git clone https://git.mgrote.net/Mirror/sanoid.git
|
2023-08-02 20:51:04 +02:00
|
|
|
- cp sanoid-prune.service sanoid/
|
|
|
|
- cp sanoid.service sanoid/
|
|
|
|
- cp sanoid.timer sanoid/
|
2023-06-28 14:21:27 +02:00
|
|
|
- cd sanoid
|
|
|
|
- # checkout latest stable release or stay on master for bleeding edge stuff (but expect bugs!)
|
2023-07-02 19:04:31 +02:00
|
|
|
#- git checkout $(git tag | grep "^v" | tail -n 1)
|
2023-07-05 12:34:39 +02:00
|
|
|
#- export version=$(git tag | grep "^v" | tail -n 1 | tr -d v)
|
2023-07-17 22:30:38 +02:00
|
|
|
- export version=3.0.1
|
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" \
|
2023-06-30 11:49:01 +02:00
|
|
|
-p sanoid_$(echo $version).deb \
|
2023-06-30 11:47:15 +02:00
|
|
|
-v $(echo $version) \
|
2023-07-17 22:30:38 +02:00
|
|
|
--depends debhelper \
|
|
|
|
--depends libcapture-tiny-perl \
|
|
|
|
--depends libconfig-inifiles-perl \
|
|
|
|
--depends pv \
|
|
|
|
--depends lzop \
|
|
|
|
--depends mbuffer \
|
|
|
|
--depends build-essential \
|
|
|
|
--depends git \
|
2023-08-02 20:48:47 +02:00
|
|
|
sanoid-prune.service=/lib/systemd/system/sanoid-prune.service \
|
|
|
|
sanoid.service=/lib/systemd/system/sanoid.service \
|
|
|
|
sanoid.timer=/lib/systemd/system/sanoid.timer \
|
2023-06-30 11:43:09 +02:00
|
|
|
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-30 11:48:25 +02:00
|
|
|
- name: upload
|
|
|
|
image: registry.mgrote.net/allzweckcontainer:latest
|
|
|
|
environment:
|
|
|
|
DEBIAN_FRONTEND: noninteractive
|
|
|
|
auth_token:
|
|
|
|
from_secret: httpd-api-server-token
|
|
|
|
commands:
|
2023-06-30 11:49:37 +02:00
|
|
|
- ls -lah
|
2023-06-30 11:50:47 +02:00
|
|
|
- pwd
|
|
|
|
- cd sanoid
|
|
|
|
- ls -lah
|
|
|
|
- pwd
|
2023-07-17 22:30:38 +02:00
|
|
|
- export version=3.0.1
|
2023-06-30 11:51:14 +02:00
|
|
|
- echo $version
|
2023-06-28 14:21:27 +02:00
|
|
|
- |
|
2023-06-30 11:49:01 +02:00
|
|
|
curl -X POST -H "token: $auth_token" -F "file=@./sanoid_$(echo $version).deb" http://docker10.grote.lan:5040/upload
|