aboutsummaryrefslogtreecommitdiff
path: root/builds/monthly/capsul-openbsd-6.8.yaml
blob: 5551e2b9d243c015e96be2afec43f3303ddb07a7 (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
# this builds the capsul openbsd 10 template img
image: alpine/edge
packages:
  - qemu-img
  - qemu-system-x86_64
  - rsync
  - packer
environment:
  version: 6.8
  slaves:
    - deploy@baikal.cyberia.club
secrets:
  # deploy@baikal.cyberia.club
  - aac6b8d1-65c1-4d7f-862f-094716b800e3
sources:
  - https://git.cyberia.club/services/capsul-images
triggers:
  - action: email
    condition: failure
    to: ops <ops@cyberia.club>
tasks:
  - genimg:
    cd capsul-images/openbsd
    sudo ./build $version
  - deploy: |
      cd capsul-images/openbsd
      echo "StrictHostKeyChecking=no" >> ~/.ssh/config
      for server in "${slaves[@]}"
      do
        ssh $server mkdir -p /tank/img/openbsd/$version
        rsync -rzP $version/output-qemu/root.img.qcow2 \
          ${server}:/tank/img/openbsd/$version/new_root.img.qcow2
        ssh $server \
          mv /tank/img/openbsd/$version/new_root.img.qcow2 \
             /tank/img/openbsd/$version/root.img.qcow2
      done