diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-07-27 17:14:41 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-07-27 17:14:41 +0300 |
commit | 37147aa3ce743132cb973d8adec54fe7d8b2d08c (patch) | |
tree | d5354f3385e32ad35ab05c742b0d979e4c1ea0fb /ci-prod-websites.ick | |
parent | d8ceea1cb92cbbe5b200e9452a8b9e9645b18957 (diff) | |
download | liw-ci-37147aa3ce743132cb973d8adec54fe7d8b2d08c.tar.gz |
Change: split up ci-prod.ick into smaller files, re-create all
Diffstat (limited to 'ci-prod-websites.ick')
-rw-r--r-- | ci-prod-websites.ick | 186 |
1 files changed, 186 insertions, 0 deletions
diff --git a/ci-prod-websites.ick b/ci-prod-websites.ick new file mode 100644 index 0000000..6237f1b --- /dev/null +++ b/ci-prod-websites.ick @@ -0,0 +1,186 @@ +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@pieni.net:/srv/http/ick.liw.fi + sources: + - name: source + ref: master + location: src + repo: git://git.liw.fi/ick.liw.fi + pipelines: *ikiwiki_pipelines + +- project: noir.liw.fi + parameters: + <<: *ikiwiki_params + rsync_target: ickliwfi@pieni.net:/srv/http/noir.liw.fi + sources: + - name: source + ref: master + location: src + repo: git://git.liw.fi/noir.liw.fi + pipelines: *ikiwiki_pipelines + +- project: intra.qvarnlabs.net + parameters: + <<: *ikiwiki_params + notify: [liw@qvarnlabs.com, ivan@qvarnlabs.com] + rsync_target: static@static.qvarnlabs.net:/srv/http/intra.qvarnlabs.net + sources: + - name: source + ref: master + location: src + repo: ssh://git@git.qvarnlabs.net/intrawiki + pipelines: *ikiwiki_pipelines + +- project: www.qvarn.org + parameters: + <<: *ikiwiki_params + notify: [liw@qvarnlabs.com, ivan@qvarnlabs.com] + rsync_target: static@static.qvarnlabs.net:/srv/http/www.qvarn.org + sources: + - name: source + ref: master + location: src + repo: ssh://git@git.qvarnlabs.net/www.qvarn.org + pipelines: *ikiwiki_pipelines + +- project: www.qvarnlabs.com + parameters: + <<: *ikiwiki_params + notify: [liw@qvarnlabs.com, ivan@qvarnlabs.com] + rsync_target: static@static.qvarnlabs.net:/srv/http/www.qvarnlabs.com + sources: + - name: source + ref: master + location: src + repo: ssh://git@git.qvarnlabs.net/www.qvarnlabs.com + pipelines: *ikiwiki_pipelines + +- project: ick-biz.liw.fi + parameters: + <<: *ikiwiki_params + notify: [liw@liw.fi] + rsync_target: ickliwfi@pieni.net:/srv/http/ick-biz.liw.fi + sources: + - name: source + ref: master + location: src + repo: ssh://git@git.liw.fi/ick-biz + pipelines: *ikiwiki_pipelines + + + +- project: ick-yarns.liw.fi + parameters: + sources: + - name: code + ref: master + location: src + repo: git://git.liw.fi/ick2 + rsync_src: html + rsync_target: ickliwfi@pieni.net:/srv/http/ick-yarns.liw.fi + systree_name: systrees-debian-stretch-distix + notify: [liw@liw.fi] + pipelines: + - ick/setup_container + - ick/get_sources + - publish_yarns + +- project: ick-pres.liw.fi + parameters: + sources: + - name: source + ref: master + location: src + repo: ssh://git@git.liw.fi/ick2-pres + rsync_src: html + rsync_target: ickliwfi@pieni.net:/srv/http/ick-pres.liw.fi + systree_name: systrees-debian-stretch-distix + notify: [liw@liw.fi] + pipelines: + - ick/setup_container + - ick/get_sources + - git_export_website + + + +pipelines: + + - pipeline: ql_ikiwiki_publish + parameters: + - sources + - rsync_src + - rsync_target + actions: + - python: | + import os, re, subprocess + def RUN(*args, **kwargs): + print('Executing:', args, kwargs) + subprocess.check_call(args, **kwargs) + + 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('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 |