aboutsummaryrefslogtreecommitdiffstats
path: root/.drone.yml
blob: 42dd00f83b5e55d01bc83906080be3a19968de07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
kind: pipeline
type: docker
name: default
steps:
  - name: run gitleaks
    image: plugins/gitleaks
    settings:
      path: .

  - name: build package
    image: registry.mgrote.net/fpm:latest
    environment:
      DEBIAN_FRONTEND: noninteractive
      auth_token:
        from_secret: httpd-api-server-token
    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)
      - export version=$(git tag | grep "^v" | tail -n 1 | tr -d v)
      - ls -lah
      - pwd
      - chmod 0755 alacritty
      - |
        fpm \
          -s dir \
          -t deb \
          --name alacritty \
          --architecture all \
          --description "alacritty terminal deb package" \
          --url "https://git.mgrote.net/mg/build-alacritty" \
          -p alacritty.deb \
          -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



      - |
        curl -X POST -H "token: $auth_token" -F "file=@./sanoid_$(echo $version)_all.deb" http://docker10.grote.lan:5040/upload
      - |
        curl -X POST -H "token: $auth_token" -F "file=@./sanoid_latest_all.deb" http://docker10.grote.lan:5040/upload

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