aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
blob: 93fe3b0ec0066adb7db0b29a78a0595f61edf291 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
stages:
  - images
  - publish

variables:
  FISHDEPS: "/usr/bin/guestfish xz sudo"

.store_images: &store_images
  - xz --verbose $(ls *.tar *.qcow2)
  - mkdir $CI_JOB_NAME
  - mv --verbose *.xz $CI_JOB_NAME
  - name="$CI_JOB_NAME images"
  - base="$CI_JOB_URL/artifacts/raw/$CI_JOB_NAME"
  - tree -i -f -s -h -D --charset utf8 -T "$name" -H "$base" $CI_JOB_NAME > index.html
  - mv --verbose index.html $CI_JOB_NAME
  - ls -l -h $CI_JOB_NAME

centos7:
  stage: images
  image: registry.gitlab.com/kraxel/rpm-package-builder:centos7
  before_script:
    - time yum install -y $FISHDEPS
  script:
    - sed -i -e '/proxy/d' repos/centos-7.repo
    - time ./CentOS7-efi.sh
    - *store_images
  artifacts:
    paths:
      - centos7

centos8:
  stage: images
  image: registry.gitlab.com/kraxel/rpm-package-builder:centos8
  before_script:
    - time dnf install -y $FISHDEPS
  script:
    - sed -i -e '/proxy/d' repos/centos-8.repo
    - time ./CentOS8-efi.sh
    - *store_images
  artifacts:
    paths:
      - centos8

fedora:
  stage: images
  image: registry.gitlab.com/kraxel/rpm-package-builder:fedora
  before_script:
    - time dnf install -y $FISHDEPS
  script:
    - time ./Fedora-efi-grub2.sh
    - *store_images
  artifacts:
    paths:
      - fedora

fedora_systemd:
  stage: images
  image: registry.gitlab.com/kraxel/rpm-package-builder:fedora
  before_script:
    - time dnf install -y $FISHDEPS
  script:
    - time ./Fedora-efi-systemd.sh
    - *store_images
  artifacts:
    paths:
      - fedora

wsl:
  stage: images
  image: registry.gitlab.com/kraxel/rpm-package-builder:fedora
  script:
    - sed -i -e '/proxy/d' repos/centos-8.repo
    - dnf install -y which
    - time ./Fedora-wsl.sh
    - time ./CentOS8-wsl.sh
    - *store_images
  artifacts:
    paths:
      - wsl

pages:
  stage: publish
  image: registry.gitlab.com/kraxel/rpm-package-builder:fedora
  dependencies:
    - centos7
    - centos8
    - fedora
    - fedora_systemd
    - wsl
  script:
    - mkdir public
    - for d in centos7 centos8 fedora wsl; do mv -v ${d}/index.html public/${d}.html; done
    - cat pages/header.html                     >  listing.html
    - cat pages/efi.html                        >> listing.html
    - cat public/*.html | grep "href.*qcow2.xz" >> listing.html
    - cat pages/wsl.html                        >> listing.html
    - cat public/*.html | grep "href.*tar.xz"   >> listing.html
    - cat pages/footer.html                     >> listing.html
    - mv -v listing.html public/index.html
    - tree --charset utf8 -T "images" -H . public > tree.html
    - mv -v tree.html public
  artifacts:
    paths:
      - public/