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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
projects:
- project: dummy-ikiwiki
parameters: &ikiwiki_params
rsync_src: html
systree_name: systrees-debian-stretch-distix
notify: [liw@liw.fi]
pipelines: &ikiwiki_pipelines
- ick/setup_container
- ick/get_sources
- ql_ikiwiki_publish
- project: ick.liw.fi
parameters:
<<: *ikiwiki_params
rsync_target: ickliwfi@ick.liw.fi:/srv/http/ick.liw.fi
sources:
- name: source
ref: master
location: src
repo: git://git.liw.fi/ick.liw.fi
pipelines: *ikiwiki_pipelines
- project: journal.liw.fi
parameters:
<<: *ikiwiki_params
rsync_target: ickliwfi@journal.liw.fi:/srv/http/journal.liw.fi
sources:
- name: source
ref: master
location: src
repo: ssh://git@git.liw.fi/private/liw/Journal
pipelines: *ikiwiki_pipelines
- project: manifesto
parameters:
<<: *ikiwiki_params
rsync_target: ickliwfi@manifesto.liw.fi:/srv/http/manifesto.liw.fi
sources:
- name: source
ref: master
location: src
repo: ssh://git@git.liw.fi/private/liw/manifesto
pipelines: *ikiwiki_pipelines
- project: vmdb2.liw.fi
parameters:
<<: *ikiwiki_params
rsync_target: ickliwfi@vmdb2.liw.fi:/srv/http/vmdb2.liw.fi
sources:
- name: source
ref: master
location: src
repo: git://git.liw.fi/vmdb2.liw.fi
pipelines: *ikiwiki_pipelines
- project: noir.liw.fi
parameters:
<<: *ikiwiki_params
rsync_target: ickliwfi@noir.liw.fi:/srv/http/noir.liw.fi
sources:
- name: source
ref: master
location: src
repo: git://git.liw.fi/noir.liw.fi
pipelines: *ikiwiki_pipelines
- project: vmdb2-manual
parameters:
sources:
- name: source
ref: master
location: src
repo: git://git.liw.fi/vmdb2
rsync_src: html
rsync_target: ickliwfi@vmdb2-manual.liw.fi:/srv/http/vmdb2-manual.liw.fi
systree_name: systrees-debian-sid-build-essential
notify: [liw@liw.fi]
pipelines:
- ick/setup_container
- ick/get_sources
- publish_vmdb2_manual
pipelines:
- pipeline: ql_ikiwiki_publish
parameters:
- sources
- rsync_src
- rsync_target
actions:
- python: |
import os, re
env = dict(os.environ)
env['LC_ALL'] = 'fi_FI.UTF8'
sources = params['sources']
for source in sources:
dirname = source['location']
RUN('rm', '-rf', 'html', 'tmp')
RUN('ql-ikiwiki-preprocess', dirname, 'tmp', env=env)
RUN('find', '-ls')
RUN('sed', '-i', '/^srcdir:/d', 'tmp/ikiwiki.setup', env=env)
RUN('sed', '-i', '/^destdir:/d', 'tmp/ikiwiki.setup', env=env)
with open('tmp/ikiwiki.setup', 'a') as f:
f.write('srcdir: /workspace/tmp\n')
f.write('destdir: /workspace/html\n')
RUN('ikiwiki', '--setup', 'tmp/ikiwiki.setup', '--verbose', env=env)
where: container
- action: rsync
where: host
- pipeline: publish_yarns
parameters:
- rsync_src
- rsync_target
actions:
- shell: |
mkdir html
cd src/yarns
pandoc \
--toc \
--standalone \
--self-contained \
-H yarn.css \
-o /workspace/html/index.html \
*.yarn
where: container
- action: rsync
where: host
- pipeline: git_export_website
parameters:
- rsync_src
- rsync_target
actions:
- shell: |
html="$(params | jq -r .rsync_src)"
mkdir "$html"
cd src
git archive HEAD | tar -C "../$html" -xf -
where: container
- action: rsync
where: host
- pipeline: publish_vmdb2_manual
parameters:
- rsync_src
- rsync_target
actions:
- shell: |
apt update
apt dist-upgrade -y
apt install -y pandoc texlive texlive-xetex fonts-freefont-ttf
mkdir html
cd src
./format.sh
cp vmdb2.html ../html/index.html
cp vmdb2.pdf ../html/vmdb2.pdf
where: container
- action: rsync
where: host
|